Just for curiosity... If possible, where can I find and see the javascript submit() function's content on the form? Just to see how it handles http requests.
thanks!
Just for curiosity... If possible, where can I find and see the javascript submit() function's content on the form? Just to see how it handles http requests.
thanks!
Javascript submit just submits the value of the forms into the page you specified in the action parameter of the form. So u can get those data from that page .ie, the page in the action parameter.
It's a native code built-into your browser.
If you are using Firefox, you can see the code for any function by using alert(func.toSource())
yet Firefox won't reveal the code for submit().
Try typing this in the location box of your Firefox on any webpage that has at least one form on it (e.g. this very page): javascript: alert(document.forms[0].submit.toSource())
to see what I mean ;)
The submit() function is not in JS anymore, it's built into the browser. So, short of hooking into the browser process with a debugger, you can't see the execution as it goes into submit() and gets transformed into a HTTP request.
However, if you want to see the HTTP request (and response), use some sort of capturing proxy, like EricLaw's excellent Fiddler (this should be sufficient, but should you wish to inspect the lower layers (TCP,IP), you can capture the data using Wireshark)
I would recommend using Firebug's Net panel. It shows you headers, post, response