Python Forum
POST Reply to Ajax/jQuery (mostly an HTML question) - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Web Scraping & Web Development (https://python-forum.io/forum-13.html)
+--- Thread: POST Reply to Ajax/jQuery (mostly an HTML question) (/thread-35552.html)



POST Reply to Ajax/jQuery (mostly an HTML question) - gw1500se - Nov-16-2021

I am trying to write a script that replies to a web page but it appears the reply is via a Ajax/jQuery call. However, I am not sure as I can't find where that call takes place. There is a 'continue' button on the page that triggers the response but I don't see how it works. Here is the input tag:

<input class="th_s" data-i18n="[value]report.ContinueButtonResource1" id="MainContinueButton" type="button" value="Continue"/>

I've not used internationalization so I don't know if that can be doing something. In any case can someone help figure this out? TIA.


RE: POST Reply to Ajax/jQuery (mostly an HTML question) - ndc85430 - Nov-16-2021

Where's the JavaScript code that handles the click event on the button? You'll need to at least look at that.


RE: POST Reply to Ajax/jQuery (mostly an HTML question) - gw1500se - Nov-16-2021

That is the crux of my problem. There is no 'onclick' attribute on that button.


RE: POST Reply to Ajax/jQuery (mostly an HTML question) - snippsat - Nov-16-2021

A button do not need onclick to do something can call id ,type, value and do something in JavaScript based on that.
To see what going on is normal to use Chrome/fireFox DevTools.
If can post url we can take a look.


RE: POST Reply to Ajax/jQuery (mostly an HTML question) - ndc85430 - Nov-18-2021

As above, you don't need an onclick attribute. There should be some JavaScript code that sets up the event handling for the click event on that button (for example, a call to jQuery's click function).


RE: POST Reply to Ajax/jQuery (mostly an HTML question) - gw1500se - Nov-18-2021

Yes, I used Firefox's developer tools to trace what it happening. I found the javascriptcode that is running and opened a new threadon how to deal with it.