Jump to content

[SOLVED] hover link


crazy/man

Recommended Posts

how to make this working  :D  have some problems, guys gave me this script to use in the php help forum..

 

but i cant get it working..

 

<a href="yourlink" target="_blank" onmouseover"javascript:location.href='link';">link</a>

 

 

so my code looks like this: 

<a href="index.php?frag=system" target="_blank" onmouseover"javascript:location.href='system.php';">system</a>

 

all i want is when i hover with my mouse over some link, that it opens some window without clicking on that link like it is here: http://www.tek-9.org/team.html

 

you hover over some member and it opens new window without clicking on it, thats what i am attending to do....here: http://www.hr-clan.com/newsite/index.php?frag=team

Link to comment
Share on other sites

how to make this working  :D  have some problems, guys gave me this script to use in the php help forum..

 

but i cant get it working..

 

<a href="yourlink" target="_blank" onmouseover"javascript:location.href='link';">link</a>

 

 

so my code looks like this: 

<a href="index.php?frag=system" target="_blank" onmouseover"javascript:location.href='system.php';">system</a>

 

all i want is when i hover with my mouse over some link, that it opens some window without clicking on that link like it is here: http://www.tek-9.org/team.html

 

you hover over some member and it opens new window without clicking on it, thats what i am attending to do....here: http://www.hr-clan.com/newsite/index.php?frag=team

 

First, whoever gave you that JavaScript code should be banned from coding.  Using pseudo-protocols is horrible.

 

Second, and more importantly, you're not asking for the right thing.  You don't want a pop-up window.  A pop-up window is literally a separate browser window created by JavaScript.  No, what you want is a tooltip to appear next to the mouse.

 

Unfortunately, creating a tooltip is harder than just writing one line of code.  Generally speaking, it consists of the following steps:

 

1. You create a <div> with all the info/graphics/whatever you want as the tooltip itself.

 

2. You set that element's display attribute to "none".

 

3. You set the onmouseover event for every link that's supposed to show the tooltip to show the right one.  The tricky part here is ensuring that the tooltip is displayed on the right place on the screen.

 

4. You set those links' onmouseout event to hide the tooltip, so they're not displayed when the mouse is not hovering over them.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.