Link to home
Start Free TrialLog in
Avatar of abraham_ll
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
Avatar of Eddie Shipman
Eddie Shipman
Flag of United States of America image

If you just load the source, it won't have a value. Please explain further or give a better example.
Avatar of abraham_ll
abraham_ll

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.value=ip;}
  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
Avatar of Eddie Shipman
Eddie Shipman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial