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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using "onClick" inside an input tag

Status
Not open for further replies.

Jayson

Programmer
Jan 31, 2001
75
US
Can anybody please help me...

response.write &quot;<TR><TD><input type=submit value=&quot; & oSPH.fields(&quot;proj_id&quot;) & &quot; name=select_proj onClick=setValue(this)></TD>&quot;

The following code, produces a Submit button for each row of the table, submitting a field called &quot;proj_id&quot; to a javascript function. The code works, but the actual &quot;Submit&quot; button is labelled with the &quot;proj_id&quot; number. My question is simply how do i display the word &quot;SUBMIT&quot; on the button instead of the &quot;proj_id&quot;?
 
the value attribute of a submit button designates the displayed text. you would have to do soemthing like this (IE ONLY, but you can do something similar in NS with hidden fields and such):


<input type=submit value=&quot;Submit&quot; name=select_proj onClick=&quot;setValue(this)&quot; specialval=&quot; & oSPH.fields(&quot;proj_id&quot;) & &quot;>

then in your setvalue funciton access:

obj.specialval

where obj is the &quot;this&quot; that you are passing jared@aauser.com -
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top