Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jun 2011
    Posts
    148
    Thanks
    18
    Thanked 0 Times in 0 Posts

    passsing javascript variable via URL and read it in form textfield

    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 !!

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,947
    Thanks
    79
    Thanked 4,424 Times in 4,389 Posts
    Code:
    var newID = 2;
    row.insertCell(6).innerHTML = "<a href=Update_Gate.cfm?GateIdVar=" + newID + ">Edit Gate</a>";
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #3
    Regular Coder
    Join Date
    Jun 2011
    Posts
    148
    Thanks
    18
    Thanked 0 Times in 0 Posts
    Thanks Old Pendant !!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •