work with ajax and window.location

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • khosrojerdi
    New Member
    • Jan 2013
    • 1

    work with ajax and window.location

    please help me
    I send parameters to another page by window.location ="private1.asp? userid=" + document.getEle mentById('useri d').value&"name ="+username;
    but i don't know how can i use parameters in private.asp
  • Anas Mosaad
    New Member
    • Jan 2013
    • 185

    #2
    Please check the asp tutorial at http://www.w3schools.com/asp/asp_ref_request.asp

    BTW, you may get only one parameter at your asp page (i.e. userid) as the character & need to proceed the name=. It should be something like this:

    Code:
    window.location="private1.asp?userid=" + document.getElementById('userid').value + "&name="+username;
    One more thing, you need to escape the string before putting at the URL to make sure you are having a valid URL (i.e. use escape function).

    Comment

    Working...