crazy/man Posted December 2, 2008 Share Posted December 2, 2008 how to make this working 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 Quote Link to comment https://forums.phpfreaks.com/topic/135192-solved-hover-link/ Share on other sites More sharing options...
KevinM1 Posted December 2, 2008 Share Posted December 2, 2008 how to make this working 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. Quote Link to comment https://forums.phpfreaks.com/topic/135192-solved-hover-link/#findComment-704291 Share on other sites More sharing options...
crazy/man Posted December 2, 2008 Author Share Posted December 2, 2008 i've found a nice code, edited it a little bit and now it works, looks great Quote Link to comment https://forums.phpfreaks.com/topic/135192-solved-hover-link/#findComment-704408 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.