redirection

Discussion in 'JavaScript' started by promotingspace.net, Apr 18, 2010.

  1. #1
    Hi
    I submit a form with Ajax
    On successful insert, I used meta refresh in the <div> I displayed successful message to redirect user
    <meta http-equiv="refresh" content="0; url=index.php">
    Code (markup):
    But it doesn't work
    I wanted to use javascript window.location, but I have to place it on head or show a button with "onclick"

    But I want the user to be redirected automatically and keep ajax submission of my form
    Any idea?
    Thanks
     
    promotingspace.net, Apr 18, 2010 IP
  2. dimitar christoff

    dimitar christoff Active Member

    Messages:
    882
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    90
    #2
    so why not pass this on the oncomplete / onsuccess / onreadystatechange event as you stated originally via window.location.href = newurl; ? i don't see how the success event needs to be in the head of the site...
     
    dimitar christoff, Apr 19, 2010 IP