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

Methods of passing hidden variable?

Status
Not open for further replies.

logius

Programmer
Aug 30, 2001
175
US
I'm trying to pass a variable from one form to another in a webpage using javascript with CF. Problem is that the hidden variable I'm passing isn't being received by the other page (it works in Netscape but not IE). Are there any other ways I can go about passing a variable that I want to keep hidden? ----------------------------------------
If you are reading this, then you have read too far... :p

lightwarrior@hotmail.com
 
Can you post the code? Do you have to use Javascript or can you just use CF? Surprising that there is something that works in NN but not IE.

There are lots of ways to hide variables. Think not only form variables (method=post), but other variables like application or session variables, or cookies.
 
Sorry, but posting the code is something I CAN'T do. Security reasons and all. Upon further investigation, though, I found that the source of the hidden variable is coming from an embedded form that's being called from the main form. Again, sorry, but I've only been working with CF for about 3 days now and they really have my hands tied. ----------------------------------------
If you are reading this, then you have read too far... :p

lightwarrior@hotmail.com
 
I think we all have those same security concerns -- you'll find that most code posted here refers to "myfile.cfm" and datasource="something" and all that. You take the bits of code that you need to show and strip all of the sensitive info out of it. Then it's just code.

Let me know if there is anything I can help with.
 
You can pass a hidden variable by making it a hidden form field.

For example:

<form name=&quot;form1&quot; method=&quot;post&quot; action=&quot;nextpage.cfm&quot;>
<input type=&quot;hidden&quot; name=&quot;hiddenField&quot; value=&quot;This is a hidden variable that you can then refer to on the following page using FORM.hiddenField&quot;>
<input type=&quot;submit&quot; name=&quot;Submit&quot; value=&quot;Submit&quot;>
</form>

Ryan ;-]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top