Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set value of database generated form 1

Status
Not open for further replies.

mulligh

Technical User
May 8, 2001
97
0
0
US
I need to change the value attribute on an <input> element created by a database form. The form is created by a database program, so I don't have control over how that form is created. I only want to change the value of one of the <input> elements after the page loads. The form looks like this, and is the only form on the page:

<form id="formToolBar">
<input type="button" value="Previous">
<input type="button" value="Next">
<input type="button" value="Back">
<input type="button" value="<<">
</form>

I want to change that fourth <input> value to:

<input type="button" value="Search results">
 
Try this:

[tt]<body onload="document.forms[0].elements[3].value='Search Results'">[/tt]

This would be slightly easier if
a) the form had a name attribute
b) the input button had a name attribute

However, the code I provided should work.

*cLFlaVA
----------------------------
When will I be able to see what other members can see about myself? It's been like, a freakin' month already!
 
Actually, it would be just as easy, but we wouldn't have to use numerical indeces.

*cLFlaVA
----------------------------
When will I be able to see what other members can see about myself? It's been like, a freakin' month already!
 
Thanks. This is exactly what I needed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top