+ Reply to Thread
Results 1 to 6 of 6

Thread: JavaScript: Opening 2 links with 1 Click

  1. #1
    TcM
    TcM is offline
    Code Warrior TcM is a name known to all TcM is a name known to all TcM is a name known to all TcM is a name known to all TcM is a name known to all TcM is a name known to all TcM's Avatar
    Join Date
    Aug 2006
    Posts
    11,461
    Blog Entries
    6

    JavaScript: Opening 2 links with 1 Click

    Introduction:-
    Well here I will show you how to open 2 links with just one click.

    Solution:-

    Here is the Code, insert this in the Head:-

    Code:
    <SCRIPT LANGUAGE="JavaScript"> 
    
    function DoubleOpen(site1, site2) { 
    window.open(site1); 
    window.location = site2; 
    } 
    </script>
    and this goes into the body

    Code:
    <a href="javascript:DoubleOpen('site1', 'site2');">Click Here</a>
    Example:-
    Code:
    <a href="javascript:DoubleOpen('http://www.codecall.net/', 'http://forum.codecall.net/');">Click Here</a>
    Conclusion:-
    As Always The Full Code Is Attached And Feedback Is Welcome!
    Attached Files

  2. #2
    Programming God xtraze is an unknown quantity at this point
    Join Date
    Dec 2006
    Location
    Sri lanka
    Posts
    908
    Nice, I think I will try to use this for IPB and make another window oen requesting unregistered members to sign-up.

  3. #3
    TcM
    TcM is offline
    Code Warrior TcM is a name known to all TcM is a name known to all TcM is a name known to all TcM is a name known to all TcM is a name known to all TcM is a name known to all TcM's Avatar
    Join Date
    Aug 2006
    Posts
    11,461
    Blog Entries
    6
    Quote Originally Posted by xtraze View Post
    Nice, I think I will try to use this for IPB and make another window oen requesting unregistered members to sign-up.
    I'm happy that you found a use for this

  4. #4
    Programming God xtraze is an unknown quantity at this point
    Join Date
    Dec 2006
    Location
    Sri lanka
    Posts
    908
    I always think of uses for tutorials being posted here. I may not use all but maybe someone else can. Look at all replies I have made dude, most of them are alternates or uses.

  5. #5
    Programming God AfTriX is on a distinguished road
    Join Date
    Jan 2007
    Location
    Chicago
    Posts
    586
    Thanks!
    Nice trick of parsing a couple of arguments to the function.

    Code:
    windows.location = xxx;
    The code that I'v learnt now.

  6. #6
    Newbie TheJun is an unknown quantity at this point
    Join Date
    Aug 2007
    Posts
    1
    Thank you very much.

+ 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. Does Google Penalize for too many inbound links
    By Cleo8 in forum Search Engine Optimization
    Replies: 8
    Last Post: 03-01-2010, 12:28 AM
  2. Few High PR links vs. Several lower PR links
    By Dan in forum Search Engine Optimization
    Replies: 11
    Last Post: 12-22-2008, 06:44 PM
  3. Windows XP Tricks & Tips!!!!..new ones.
    By pranky in forum Tutorials
    Replies: 9
    Last Post: 08-23-2008, 03:22 PM
  4. Replies: 6
    Last Post: 01-12-2007, 03:26 AM
  5. .Gov and .Edu links
    By DevilsCharm in forum Search Engine Optimization
    Replies: 3
    Last Post: 08-23-2006, 09:22 PM

Bookmarks

Bookmarks

     
        Algorithms and Data Structures

        Java tutorials

        Algorithms Forum

Posting Permissions

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