javascript link question

  • jhaylee
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Apr 10, 2004
  • Posts: 10
  • Status: Offline

Post April 24th, 2004, 10:29 am

I am trying to link to a page based on browser version and also do a onmouseover action on the same link. I am using javascript and I can get them to work separately but when I combine the two the onmouseover is not working. here is the code:

<a href="javascript:void 0" onmouseover="act()" onmouseout="inact()" onclick="this.href=top.mr_page" target="main" >
<img src="../../images/mr2.png" name="mrImg" border="black" width="80" height="110" hspace=14>
</a>

any ideas?
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post April 24th, 2004, 10:29 am

  • rtm223
  • Mastermind
  • Mastermind
  • User avatar
  • Joined: Mar 24, 2004
  • Posts: 1855
  • Loc: Uk
  • Status: Offline

Post April 25th, 2004, 1:46 am

Code: [ Select ]
<a href="javascript:this.href=top.mr_page" onmouseover="act()" onmouseout="inact()">
<img src="../../images/mr2.png" name="mrImg" border="black" width="80" height="110" hspace=14>
</a>
  1. <a href="javascript:this.href=top.mr_page" onmouseover="act()" onmouseout="inact()">
  2. <img src="../../images/mr2.png" name="mrImg" border="black" width="80" height="110" hspace=14>
  3. </a>


Try that, I don't know if it will work and I don't know why the original didn't. :D

If not try href="window.location=top.mr_page"

Hope these help
CSS website design tutorials
  • jhaylee
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Apr 10, 2004
  • Posts: 10
  • Status: Offline

Post April 25th, 2004, 4:04 pm

Thanks. still don't know what the problem was because it worked with netscape and not with IE. My IE is integrated with Visual Studio so when I'm on a page with Javascript it often says Error: line xx Do you wish to debug? most of the time its not really an error, it happens on a lot of sites, even Google.
  • rtm223
  • Mastermind
  • Mastermind
  • User avatar
  • Joined: Mar 24, 2004
  • Posts: 1855
  • Loc: Uk
  • Status: Offline

Post April 26th, 2004, 12:42 am

thats visual c++ I think. And that bugger really sticks around, even if you uninstall all of visual studio.

I found that thing a real pain lol :lol:
CSS website design tutorials

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: No registered users and 243 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
 
cron
 

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