troubleshooting Question

How do I pass a dynamically created form field to another page through an href query string or on Click method

Avatar of HometownComp
HometownComp asked on
13 Comments1 Solution575 ViewsLast Modified:
Hi.  I'm updating an older website that is still using Classic Asp (so please no answers thanks!)  I'm working with a page where my form fields are dynamically named from a record source.   The user will click on a button or link that will pop up my other page in a new window (specific size) and all i need to know in the new window is what record or row they clicked on.  There are quite a few different ways I see to do this but I'm not sure how to pass my field name variable and value properly within javascript needed to open a new sized pop up window.  For example.. i have ..

<input type="hidden" name="<%=RecFldNm%>" value="<%=vPRecID%>">
<input type="button" name="<%=AddBtn%>"  value="Add">

So..  if I have 3 rows displayed from my record set, I end up with 3 sections on my form with each item named... (source view)

<input type="hidden" name="RecFldNm1" value="39471" >
<input type="button" name="AddBtn1"  value="Add">
<input type="hidden" name="RecFldNm2" value="39472" >
<input type="button" name="AddBtn2"  value="Add">
<input type="hidden" name="RecFldNm3" value="39473" >
<input type="button" name="AddBtn3"  value="Add">

I have no problem getting everything I need when posting the form to my asp code page etc.  My problem here is that I want the user to click on one of the "Add" buttons (or it can be a hyperlink etc.) that opens another page in a new window that is sized that allows them to add some things.  If the user chooses the 2nd record, i want to be able to pass 39472 record id, value of my hidden field RecFldNm2 to the new page or even know that they clicked on AddBtn2.  I can work with either way.. i'm just not sure how to pass the value.

Thanks for any help!
Join our community to see this answer!
Unlock 1 Answer and 13 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 13 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros