1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

redirect in ajax?

Discussion in 'PHP' started by vetrivel, Oct 12, 2009.

  1. #1
    Hi,
    I am using ajax script in one of my page.
    Now i will check for a variable and that variable dont have value then i need to redirect it to some other page immediately.I have tried meta refresh ,windoe.opener.location and also redirect,but no use.
    Any help.?
     
    vetrivel, Oct 12, 2009 IP
  2. premiumscripts

    premiumscripts Peon

    Messages:
    1,062
    Likes Received:
    48
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You simply have to do window.location = 'url'; That should work just fine.
     
    premiumscripts, Oct 12, 2009 IP
  3. JAY6390

    JAY6390 Peon

    Messages:
    918
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    0
    #3
    JAY6390, Oct 12, 2009 IP
  4. vetrivel

    vetrivel Peon

    Messages:
    147
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Hi,
    yes ,I know this and i have used it before.
    But will it redirect the page or it will load the redirect content in the DIV where we load the ajax content.

    because i have tried the php redirect but it just the show the content inside teh div instead of in the whole page.
    That is the reason i am posting it here.
    Am i right?


     
    vetrivel, Oct 12, 2009 IP
  5. JAY6390

    JAY6390 Peon

    Messages:
    918
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    0
    #5
    redirect will load in the page, not in the div
     
    JAY6390, Oct 12, 2009 IP