Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jul 2010
    Posts
    36
    Thanks
    20
    Thanked 0 Times in 0 Posts

    Redirect By AutoClick

    Hello,

    I'm new to Javascript Programming. Therefore be patient with me.

    I'm looking for a script where if someone goes to www.site1.com this site will automatically go to www.site2.com by simulating a mouse click.

    I've looked everywhere on the internet for a solution but had no luck.

    Any assistance will be greatly appreciated.

    Thanks
    Velvet.

  • #2
    New to the CF scene
    Join Date
    Jul 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Code:
    <body onload="javascript:location.href='http://www.site2.com'"></body>
    Last edited by kixo; 07-29-2010 at 06:22 AM.

  • #3
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    17,984
    Thanks
    203
    Thanked 2,536 Times in 2,514 Posts
    Quote Originally Posted by kixo View Post
    Code:
    <body onload="javascript:location.href='http://www.site2.com'"></body>
    That is a simple redirect but I suspect that the OP has more devious intentions. You cannot "simulate a mouse click" nor redirect a user away from a site which is not your own.


  •  

    Posting Permissions

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