Redirect on mouseover body

  • corvette6769
  • Born
  • Born
  • User avatar
  • Joined: May 13, 2004
  • Posts: 2
  • Loc: Central Illinois, USA
  • Status: Offline

Post May 16th, 2004, 9:32 pm

I have had two members here tell me that there are multiple threads addressing this, however after another two hours of searching every conceivable search term and keywords I can imagine, I can not find the threads to which they refer.

What I want is a redirect that is activated on mouseover the web page body.

Right now I am using:

Code: [ Select ]
<SCRIPT LANGUAGE="Javascript">
browser= navigator.appName;
if (browser == "Netscape")
window.location="TheTargetURL"; else window.location="TheTargetURL"
</SCRIPT>
</Head>
<body>
  1. <SCRIPT LANGUAGE="Javascript">
  2. browser= navigator.appName;
  3. if (browser == "Netscape")
  4. window.location="TheTargetURL"; else window.location="TheTargetURL"
  5. </SCRIPT>
  6. </Head>
  7. <body>


Any help would sure be appreciated.

The following does exactly what I need, but I do not possess the know how to decipher the hex code containing the script.

Code: [ Select ]
<body onMouseOver="eval(unescape('%6C%6F%63%61%74%69%6F%6E%2E%68%72%65%66%3D%27%68%74%74%70%3A%2F%2F%77%77%77%2E%66%69%6E%61%6E%63%69%61%6C%2D%66%61%6D%69%6C%79%70%6C%61%6E%6E%69%6E%67%2E%63%6F%6D%2F%27%3B'));"
bgcolor="#ffffff" text="#000000" link="#000000" vlink="#000000">
  1. <body onMouseOver="eval(unescape('%6C%6F%63%61%74%69%6F%6E%2E%68%72%65%66%3D%27%68%74%74%70%3A%2F%2F%77%77%77%2E%66%69%6E%61%6E%63%69%61%6C%2D%66%61%6D%69%6C%79%70%6C%61%6E%6E%69%6E%67%2E%63%6F%6D%2F%27%3B'));"
  2. bgcolor="#ffffff" text="#000000" link="#000000" vlink="#000000">
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post May 16th, 2004, 9:32 pm

  • RichB
  • Guru
  • Guru
  • User avatar
  • Joined: May 17, 2003
  • Posts: 1121
  • Loc: Boston
  • Status: Offline

Post May 17th, 2004, 12:24 am

Code: [ Select ]
<body onMouseOver="location.href='http://www.yahoo.com/';"
bgcolor="#ffffff" text="#000000" link="#000000" vlink="#000000">
  1. <body onMouseOver="location.href='http://www.yahoo.com/';"
  2. bgcolor="#ffffff" text="#000000" link="#000000" vlink="#000000">
Free Programming Resources
  • corvette6769
  • Born
  • Born
  • User avatar
  • Joined: May 13, 2004
  • Posts: 2
  • Loc: Central Illinois, USA
  • Status: Offline

Post May 17th, 2004, 10:38 am

Thank you. That is what iIneeded.

Now that I decoded the hex, I see that the code is:

Code: [ Select ]
<body onMouseOver=\"eval(unescape(\'location.href='http://www.*******.com/';\'));\"
bgcolor=\"#ffffff\" text=\"#000000\" link=\"#000000\" vlink=\"#000000\">
  1. <body onMouseOver=\"eval(unescape(\'location.href='http://www.*******.com/';\'));\"
  2. bgcolor=\"#ffffff\" text=\"#000000\" link=\"#000000\" vlink=\"#000000\">


What is the advantage in using the "eval" ?
  • RichB
  • Guru
  • Guru
  • User avatar
  • Joined: May 17, 2003
  • Posts: 1121
  • Loc: Boston
  • Status: Offline

Post May 17th, 2004, 1:26 pm

It evaluates a string of JavaScript code, and if the argument represents one or more JavaScript statements, eval performs the statements. It might be necessary in that case because of the use of the unescape function that returns a string. If the string returned is a javascript statement, then it will be performed.
Free Programming Resources
  • UNFLUX
  • Genius
  • Genius
  • User avatar
  • Joined: Dec 20, 2002
  • Posts: 6382
  • Loc: twitter.com/unflux
  • Status: Offline

Post May 17th, 2004, 2:04 pm

please use code tags when posting, thanks
UNFLUX.FOTO
  • rtm223
  • Mastermind
  • Mastermind
  • User avatar
  • Joined: Mar 24, 2004
  • Posts: 1855
  • Loc: Uk
  • Status: Offline

Post May 17th, 2004, 2:10 pm

I'm curious as to the need for a javascript mouseover, on the body of page, redirecting to a different page - seems like a pretty useless feature to me. What is the point?

Sorry if I'm just being dumb
CSS website design tutorials
  • Sabu
  • Beginner
  • Beginner
  • No Avatar
  • Joined: May 15, 2004
  • Posts: 49
  • Status: Offline

Post May 18th, 2004, 12:04 am

So that someone can submit custom html to certain service websites that redirects the visitor, while bypassing any filters that usualy look for ONLOAD and SCRIPT, neither of which make an appearance in this particular code.

Post Information

  • Total Posts in this topic: 7 posts
  • Users browsing this forum: No registered users and 209 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.