House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  Javascript

passing javascript varial into uRL and then read it inthe othe rpage

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group  
hi ,
Mo Lay
09/14/11 11:20 P
var newId = 2;
Charlie Griefer
09/15/11 06:47 A
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Mo Lay
09/14/2011 11:20 PM

hi , i am trying to pass a javascript variable into URL ..but not getting the value.. var newID = 2; row.insertCell(6).innerHTML = "<a href=Update_Gate.cfm?GateIdVar=newID>Edit Gate</a>"; i am getting "newID" in Update_Gate.cfm page ... i want to pass this javascript variable in url and read it on the other page as form field value any help !!

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Charlie Griefer
09/15/2011 06:47 AM

var newId = 2; row.insertCell( 6 ).innerHTML = "<a href=Update_Gate.cfm?GateIdVar=" + newId + ">Edit Gate</a>"; You need to concatenate your variable value (newId) with the literal string (everything else). By just passing one quoted literal string, 'newID' is just that... a literal string. -- Charlie Griefer http://charlie.griefer.com (http://charlie.griefer.com/) I have failed as much as I have succeeded. But I love my life. I love my wife. And I wish you my kind of success. ----- Excess quoted text cut - see Original Post for more -----


<< Previous Thread Today's Threads  

Search javascript

May 25, 2012

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
     1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31     

Designer, Developer and mobile workflow conference