Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-29-2010, 04:23 AM   PM User | #1
Velvet
New Coder

 
Join Date: Jul 2010
Posts: 36
Thanks: 20
Thanked 0 Times in 0 Posts
Velvet is an unknown quantity at this point
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.
Velvet is offline   Reply With Quote
Old 07-29-2010, 06:18 AM   PM User | #2
kixo
New to the CF scene

 
Join Date: Jul 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
kixo is an unknown quantity at this point
Code:
<body onload="javascript:location.href='http://www.site2.com'"></body>

Last edited by kixo; 07-29-2010 at 06:22 AM..
kixo is offline   Reply With Quote
Old 07-29-2010, 07:32 AM   PM User | #3
Philip M
Supreme Master coder!

 
Philip M's Avatar
 
Join Date: Jun 2002
Location: London, England
Posts: 17,043
Thanks: 197
Thanked 2,412 Times in 2,390 Posts
Philip M has a spectacular aura aboutPhilip M has a spectacular aura aboutPhilip M has a spectacular aura about
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.
Philip M is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:08 PM.


Advertisement
Log in to turn off these ads.