SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast
    Join Date
    Apr 2003
    Location
    Toronto, Canada
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Redirection script

    How can I redirect a page from one page to another using Javascript? I want to use this feature here: http://www.acirobotics.com/ (just check the code - it doesn't work in Firefox)

  2. #2
    SitePoint Wizard realestate's Avatar
    Join Date
    May 2004
    Posts
    1,092
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I would think twice: SEs may consider this as s p a m..

  3. #3
    SitePoint Wizard
    Join Date
    Mar 2001
    Posts
    3,537
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    on_some_event="window.location.href='another_page.htm'"

    You might want to try:
    Code:
    window.onload=function()
    {
    	window.location.href = "another_page.htm";
    };
    Last edited by 7stud; Feb 1, 2005 at 20:31.

  4. #4
    SitePoint Enthusiast
    Join Date
    Apr 2003
    Location
    Toronto, Canada
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ah, yes but if you check my code there's already a conditional.
    Code:
    function detect(){
    if(screen.width<1024||screen.height<768){
    window.location.href ("v.SVGA/");
    }else{
    window.location.href("v.XGA/");
    }
    
    }
    How can I insert your suggestion into there?

  5. #5
    SitePoint Wizard
    Join Date
    Mar 2001
    Posts
    3,537
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ah, yes but if you check my code there's already a conditional.
    Then, what's the problem?


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
  •