www.webdeveloper.com
Results 1 to 7 of 7

Thread: Automatic loading a a page

  1. #1
    Join Date
    Jan 2003
    Posts
    12

    Question Automatic loading a a page

    I was wondering how you would get a webpage to load automatically after opening the initial page.

  2. #2
    Join Date
    Nov 2002
    Posts
    631
    Like this?

    <body onLoad="self.location.href='newpage.html';">

    With this, when the page loads, it will change to a new page.

  3. #3
    Join Date
    Jan 2003
    Posts
    12

    thnx


  4. #4
    Join Date
    Dec 2002
    Location
    High on life
    Posts
    10,104
    A non-javascript version is possible and recommended...

    Code:
    <meta http-equiv="refresh" content="1; url=http://www.yoursite.com">
    And, in your body, put a link - just in case the meta redirect doesn't work.

  5. #5
    Join Date
    Jan 2003
    Posts
    12
    see.. the thing is.. is that i'm doing this for an internal page that is too be used a a directory search of one of our hard drives (but it's not part of our intranet). The page that i want to redirect to is in a subfolder on that drive. When I try the above mentioned methods of redirection, it won't work, and actually crashes my computer.

    I've tried the <meta http-equiv="refresh" content="1; url=\\server\....">, but no luck.

    is there something fancy that i have to do in the url= part???

  6. #6
    Join Date
    Dec 2002
    Location
    High on life
    Posts
    10,104
    Well, if it is on an Intranet, the javascript way might be just as good. The only reason that I recommended the meta refresh was because on the Internet, you have no control over who has JavaScript enabled. An Intranet could be a different story.

  7. #7
    Join Date
    Nov 2002
    Posts
    984
    Originally posted by toorudez
    I've tried the <meta http-equiv="refresh" content="1; url=\\server\....">, but no luck.

    is there something fancy that i have to do in the url= part??? [/B]
    Perhaps try using the correct syntax?

    You are probably looking for someting like
    url=file:///C:/WINDOWS/Desktop/plopp.html
    // Stefan Huszics

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles