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 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Sep 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    seeting a variable in javascript?

    Hi friends i have this

    var infobox = "<div style='font-size:12px;font-weight:bold; background-color:#E6E6E6;height:100px;width:100%;;filter: alpha(opacity=100)'>" + name + "<br>" + Address + "<br><br> <a href ='wfmprintservice.aspx?CustNumber='"+ Cust_number +">View More Details</a></div>";


    i am able to redirect by clicking on the ling but the variable Cust_number is not being passed...Can someone please check if my h ref is being properly set...

    Thank you

  • #2
    Regular Coder
    Join Date
    Apr 2005
    Location
    Texas
    Posts
    448
    Thanks
    24
    Thanked 63 Times in 63 Posts
    That's simple enough, you closed your single quote for the href before adding your variable. try this

    Code:
    var infobox = "<div style='font-size:12px;font-weight:bold; background-color:#E6E6E6;height:100px;width:100%;;filter: alpha(opacity=100)'>" + name + "<br>" + Address + "<br><br> <a href ='wfmprintservice.aspx?CustNumber="+ Cust_number +"'>View More Details</a></div>";


  •  

    Posting Permissions

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