Link to home
Start Free TrialLog in
Avatar of PowerBids
PowerBids

asked on

Populate a field from a link

I have an app that, amongst other things, opens a web page. I want to populate form fields on that page dynamically, but can’t figure out how to pass those values. So, to simplify my question, I have the following field on my web page:
  input type="text" name="T2" size="20"
I thought I could add the value for that field in my link, such as:
  http://www.mysite.com/mypage.htm?T2.value="MyValue"
But that doesn’t work. Any suggestions as to what I’m doing wrong?
Avatar of Asora
Asora
Flag of Thailand image

The parameter in url is sent to the server so you must code some server side script to handle it and generate page dynamically depends on yout parameter.
How you are getting the values for populating the textbox. Are you taking it from the database?

If a constant value like "MyValue" is sufficient then, you can write like this :
 input type="text" name="T2" size="20" value="MyValue"

Otherwise for adding the values dynamically, you should use some scripting languages like ASP or PHP.
ASKER CERTIFIED SOLUTION
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore 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
Avatar of PowerBids
PowerBids

ASKER

That did it! Thanks for the help. I'm afraid I've been given the task of maintaining our website, so you might be hearing more from me in the future. Thanks again!