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

Passing multiple variables to new page

Status
Not open for further replies.

MinalMoe

IS-IT--Management
Mar 25, 2004
62
GB
I am using MX7 coldfusion and a form within a .cfm page. I want to go 1 of 3 pages and transfer the field data via an interim page. I am using
<SCRIPT language="JavaScript">window.location="3.cfm";</SCRIPT> to move to the new page, via 0.cfm, which works nicely. The page 0.cfm picks up the data from the form. What I want to do is then transfer that data to 3.cfm.

What do I do to that script to transfer the data to 3.cfm, and how do I pick the data up in 3.cfm?

Many thanks for any help.
 
You should use coldfusion to submit the info to 3.cfm instead of relying on javascript to navigate for you. Then you would use your normal submission processes in colfusion to extract the data from the form. I don't know coldfusion, so I'm not sure of the syntax. If I were you I'd focus all further questions to the coldfusion forum.

-kaht

Lisa, if you don't like your job you don't strike. You just go in every day and do it really half-assed. That's the American way. - Homer Simpson
 
Kaht - I would far rather use Coldfusion to go to 3.cfm, but until I can find a way of doing that I am stuck with javascript. The thing is that there is a set of 3 radiobuttons in the form and the idea is to go to 1.cfm if button 1 is clicked, 2.cfm if button 2 is clicked and 3.cfm if button 3 is clicked.

The problem is, I don't know how to select a page to move to dependant on the state of the clicked button in the form. If you have any ideas, I would be delighted to hear of them.
 
Use javascript to change the action tag on the form depending on which radio button is clicked - that way when submitted it goes to the appropriate page.

The code would look roughly like:
Code:
<input type="radio" [!]onclick="document.forms['formName'].action = '3.cfm'"[/!]>

-kaht

Lisa, if you don't like your job you don't strike. You just go in every day and do it really half-assed. That's the American way. - Homer Simpson
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top