Passing Values from Page to Page

S

syrOrange

I have the following

pn = rs("PrinterName")
I put a response.write (PN) and it displays the correct print name

Later down the code I put in
<input type="hidden" name="PN" value=" & PN & ">
<input type="submit" value="Add Maintenance Record" name="cmdAddMaint"
onClick="window.open('addMaint.asp','addWindow','width=500,height=300')">

Then on the AddMaint.ASP page I have

PN = Request.Form("PN")

I am unable to view the value of PN on this page.

Any ideas?
 
B

Bob Barrows [MVP]

syrOrange said:
I have the following

pn = rs("PrinterName")
I put a response.write (PN) and it displays the correct print name

Later down the code I put in
<input type="hidden" name="PN" value=" & PN & ">

No. you need to response.write the value of PN into the html:

<input type="hidden" name="PN" value="<%=PN%>">

<%= is shorthand for response.write


Bob Barrows
 
J

James

Do you have what you wrote or:

<input type="hidden" name="PN" value="<%Response.Write(PN)%>">
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,266
Messages
2,571,082
Members
48,772
Latest member
Backspace Studios

Latest Threads

Top