+ Reply to Thread
Results 1 to 6 of 6

Thread: JavaScript:Tutorial, Redirect URL

  1. #1
    Join Date
    Aug 2006
    Posts
    11,209
    Blog Entries
    6
    Rep Power
    101

    JavaScript:Tutorial, Redirect URL

    Introduction:-
    Welcome to another JavaScript tutorial of mine..This will code will Redirect the user to a specified website

    Solution:-
    This code goes in the <head> tags:-

    Code:
    <SCRIPT language="JavaScript"> 
     function redirUrl()
      {
        top.location="http://forum.codecall.net";
       }
     
       if (top.frames.length==0)
        {
         alert("You will be redirected to forum.codecall.net in 3 seconds!");
         setTimeout('redirUrl()',3000);
         }
    </SCRIPT>
    Explanation:-
    I think it's self explanatory no need of explanations! Its too simple

    A Preview:-


    Conclusion:-
    As Always Feedback is welcome and the full source is attached!!
    Attached Files Attached Files
    Last edited by TcM; 12-03-2006 at 04:57 AM.

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Join Date
    Oct 2006
    Location
    Hendersonville, NC
    Posts
    1,700
    Blog Entries
    3
    Rep Power
    0
    0_o Not quite custom. I made that script to an intro class in Tech School. I can look that up in my java book here at home...

    Good redirector, but you can find that anywhere.


  4. #3
    Join Date
    Aug 2006
    Posts
    11,209
    Blog Entries
    6
    Rep Power
    101
    Well Its simple and can be done by anyone and found anywhere but still.. its a tutorial

  5. #4
    -Hurricane- is offline Newbie
    Join Date
    Apr 2010
    Posts
    9
    Rep Power
    0

    Re: JavaScript:Tutorial, Redirect URL

    3 secs.....lol. i dont understand that . explain pls.

  6. #5
    bbqroast's Avatar
    bbqroast is offline Programming God
    Join Date
    Jul 2010
    Posts
    506
    Blog Entries
    9
    Rep Power
    9

    Re: JavaScript:Tutorial, Redirect URL

    Its just saying its going to wait 3 seconds:
    Many sites do this (especially for billing) so they can tell their customers that they are being transfered to a secure site that is used by them and reasure the customers that its safe. (If a window changed to a site asking for your card number would u blindly put it in).
    Theres my $5
    Please, write clearly with proper structure. Double spacing makes the text feel un-jointed, Capitalizing Every Word Means People Stop Before Every Word Sub-Consciously Which Is A Pain In The Backside, and use code tags! (The right most styling box).

  7. #6
    OriginalJesse is offline Newbie
    Join Date
    Jan 2011
    Posts
    1
    Rep Power
    0

    Re: JavaScript:Tutorial, Redirect URL

    Thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 09-15-2010, 03:15 PM
  2. Replies: 0
    Last Post: 03-19-2010, 08:23 PM
  3. JavaScript:Tutorial, Confirmation Box
    By TcM in forum JavaScript Tutorials
    Replies: 5
    Last Post: 11-07-2009, 08:13 PM
  4. JavaScript:Tutorial, Using Arrays
    By TcM in forum JavaScript Tutorials
    Replies: 25
    Last Post: 07-27-2009, 04:13 AM
  5. JavaScript:Tutorial, Loops
    By TcM in forum JavaScript Tutorials
    Replies: 4
    Last Post: 12-13-2006, 06:53 AM

Tags for this Thread

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