Thread: Variable in url

    #1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2004
    Posts
    488
    Rep Power
    12

    Variable in url


    Why is this not working trying to add dateFieldName to url? If I alert the variable it displays the value. the url no work.

    Code:
    //this works
    alert(dateFieldName);
    
    var TABLE = "<table width='400' height='400' class='dpTable'><tr><td><iframe src='/add-item?i=' + dateFieldName + ''></iframe> </td></tr></table>";
    
    // start generating the code for the calendar table
    var html = TABLE;
    alert(html);
  2. #2
  3. Did you steal it?
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    13,959
    Rep Power
    9397

IMN logo majestic logo threadwatch logo seochat tools logo