abraham_ll
asked on
How to read a form field from a website
Dear all,
How can I read a form field value (MyField) from a website (http://www.mysite.com/mypage.htm)?
I'm using Delphi 7 with Indy.
Thanks, Abraham
How can I read a form field value (MyField) from a website (http://www.mysite.com/mypage.htm)?
I'm using Delphi 7 with Indy.
Thanks, Abraham
If you just load the source, it won't have a value. Please explain further or give a better example.
ASKER
Thank you for your reply EddieShipman.
This is a form field which displays the users IP number. So on load it has a value. Here is the code:
<script language="javascript">
var ip = '<!--#echo var="REMOTE_ADDR"-->'
function ipval() {document.myform.ipaddr.va lue=ip;}
window.onload=ipval
</script>
<form method="post" action="" name="myform">
<input type="text" name="ipaddr" readonly>
</form>
This is a form field which displays the users IP number. So on load it has a value. Here is the code:
<script language="javascript">
var ip = '<!--#echo var="REMOTE_ADDR"-->'
function ipval() {document.myform.ipaddr.va
window.onload=ipval
</script>
<form method="post" action="" name="myform">
<input type="text" name="ipaddr" readonly>
</form>
very easy. I will post a solution in a couple of hours.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.