ItHurtsWhenIThink
Technical User
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...
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...