![]() |
http request and html
hey guys here is html code for a page:
:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">in other words i want to be able to perform this line in an http request: :
document.implogin.submit();so should i look into http post requests more? how can i know the systax of my http request by looking at the source code of the webpage, specifically the "submit" button.. thanks a bunch all.. |
To get a reference to the form implogin, you don't use document.implogin, but document.getElementById("implogin"). You can store the result of that in a variable if you wish.
Oh, and this should be in the JavaScript forum. |
If you want to check the form, before submitting the form. In the <form> tag put onSubmit="submit_login();" . If submit_login() returns false, the form will not submit.
|
thanks for the replies guys...
i will make my question a little more specific: This is what i sent to the IP of the website: :
GET / HTTP/1.1\r\nhow can i access :
document.getElementById("implogin") |
alright i did it... but in a very peculiar way. i made another program which emulates the server of the website that my client program was trying to access it..
this server listens for a connection, it recieves an http get request from the internet browser.. then it send the code i posted below (html/javascript).. then the server closes the connection.. i filled in the username and password in the Internet browser and clicked submit.. whose request offcource went to my emulation of the webserver im trying to see.. i studied the http request, i didnt find any relation to the page's source code.. this is what happens when you press the submit button: :
POST /imp/redirect.php?Horde=4db15905f8d71e1d00e5f2f376adc085 HTTP/1.1you can notice where the user and pass went.. user:hbe02 , pass: mypassword after i found out that the internet browser sends this request when i submit the form.. i used this request to access the webserver back in my original web client program.. any critique to my method? |
Moved to Javascript forum
|
| All times are GMT -5. The time now is 12:46 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC