Click to See Complete Forum and Search --> : assigning a value
Bill Crawley
November 20th, 2003, 09:46 AM
Hi all,
On first pass through of my ASP page I have:
Response.Write("<input type=""hidden"" name=ReportMsg value=''>")
created from the server.
On second pass I want to assign something to this value. can someone tell me the syntax for doing that.
I thought it would be something like request.form("ReportMsg").value = "xzxzxz"
Satishpp
November 20th, 2003, 11:01 AM
Response.Write("<input type=""hidden"" name=ReportMsg value='xzxzxz'>")
Will assign a value to the hidden field
Satish
Bill Crawley
November 20th, 2003, 11:12 AM
Hmmm....
Will that not confuse the process since I will already have had a hidden type of that name generated with an initial value of ''.
Secondly, as I go down the code, the value gets built up, such that if I were doing VB
it would be something like :
A = A & B
do some more code.......
A = A & C........
etc
Satishpp
November 20th, 2003, 02:17 PM
Build the value in a local variable in your ASP script. Only when you have the final value, set the value to the hidden field.
So...
A = A & B
do some more code.......
A = A & C........
finally
Response.Write("<input type=""hidden"" name=ReportMsg value=" & A & ">")
Satish
Bill Crawley
November 21st, 2003, 06:32 AM
Here's the real problem (Just found it)....
document.myForm.action="AddMultipleAuthority.asp?Print=yes&AgentId=" & document.myform("hAgentid").value & "&Find=yes"
document.myForm.submit
window.open "Reports\AddMultipleAuthorityReport.asp?AgentId=" & document.myform("hAgentid").value & "&Rep=" & document.myform("ReportMsg").value
the window.open command is processing before my form submit has finished thus the Report.msg value is always blank.
How can I tell it to not open the window until the server processing has finished
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.