SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Guru
    Join Date
    Dec 2005
    Posts
    964
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Javascript inse HTTP-EQUIV="Refresh"?

    I was wandering how I could do this:
    Code:
    <META HTTP-EQUIV="Refresh" Content="0; URL=ajax.php?page=mypage">
    with this:
    Code:
    onLoad="load(\'ajax.php?page=mypage\',\'contentarea\');"
    Can somebody please guide me... <body onLoad> is not an option... Is there other ways?

  2. #2
    Utopia, Inc. silver trophy
    ScallioXTX's Avatar
    Join Date
    Aug 2008
    Location
    The Netherlands
    Posts
    9,096
    Mentioned
    153 Post(s)
    Tagged
    2 Thread(s)
    It's not entirely clear from your question what you're trying to achieve.
    Do you want to redirect to another page (which is what the meta refresh does) or do an ajax request on load (which is what I assume your "load" function does) ?

  3. #3
    SitePoint Guru
    Join Date
    Dec 2005
    Posts
    964
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ScallioXTX View Post
    It's not entirely clear from your question what you're trying to achieve.
    Do you want to redirect to another page (which is what the meta refresh does) or do an ajax request on load (which is what I assume your "load" function does) ?
    Normally I have the ajax load function with a hyperlink like this:
    Code:
    <a href="#" onclick="load('ajax.php?page=mypage','contentarea');return false;">
    But now I want it to be a part of an redirect, caurse I have just updated my db and want to return the page...

    Hope this make it easier to understand.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •