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

java/asp mix

Status
Not open for further replies.

ItHurtsWhenIThink

Technical User
Sep 1, 2007
60
US
I need to retrieve a form field name from my page and dump it into some java script. The form fields are created dynamically in an asp page.

here are the pertinent parts of the code:

chkLeave(var) {

if (window.document.form1.frmLeaveCode.value==window.document.form1.frmCode.value)

So I need help in making "frmLeaveCode" and "frmCode" above dynamic. Q: how can I make those "var & frmLeaveCode" or "1frmLeaveCode" where var=1


//var is the progressive number that allows me to identify each form field

// in my asp page the form is created using the following (I have cleaned it up a bit for simplicity):

var = intCount

<select name="<%=var & "frmLeaveCode"%>" onChange="chkLeave(<%=var%>);">

Hope this makes sense.

Mike...

 
Code:
if (window.document.form1.<%=var & frmLeaveCode %>.value==window.document.form1.<%=frmCode%>.value)

this is not a javascript question though. if you need more help on this please post in the asp forum.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top