#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    3
    Rep Power
    0

    JavaScript: Generating new page?


    Hi

    I am developing a tool for creating web questionnaires using PHP and MySQL. After a questionnaire has been created and stored to my database, it should get its own dynamically created web links to enable users that shall answer the questionnaire to access the created questionnaire using this link.

    Can this be done using javascript? In that case how?

    Regards,
    BettyB
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Location
    The Netherlands
    Posts
    122
    Rep Power
    12
    If your urls are in a array A
    and links are in B.

    var str = "";

    for(var k = 0; k < A.length; k++){

    str += "<a href = "+A[k]+">"+B[k]+"</a><p>";

    }

    document.open();
    document.write(str);
    document.close();
    ~mgb

IMN logo majestic logo threadwatch logo seochat tools logo