Redirect in jQuery Mobile

Discussion in 'jQuery' started by greatlogix, Oct 8, 2013.

  1. #1
    I am using jquery mobile form to submit login form. process_login.php receive the form data, process the form and redirects to cp.php. Normally, you get cp.php in url bar but its not working in jquery mobile. URL is always process_login.php but content is from cp.php. and whenever i try to debug code by adding some alerts in process_login.php i get "undefined" on screen. What i need to do proper redirect in jQuery mobile environment?
     
    greatlogix, Oct 8, 2013 IP
  2. HuggyStudios

    HuggyStudios Well-Known Member

    Messages:
    724
    Likes Received:
    20
    Best Answers:
    26
    Trophy Points:
    165
    #2
    Wouldn't it be better to use an ajax request to process_login.php and then with the response redirect the user, or display errors etc for everything else?
     
    HuggyStudios, Oct 9, 2013 IP
  3. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #3
    And wouldn't it be better to name the page something else than cp.php? Some abbreviations are best left unused...
     
    PoPSiCLe, Oct 9, 2013 IP