Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Brain Dead Novice 1

Status
Not open for further replies.

eyec

Technical User
Joined
Aug 20, 2004
Messages
1,493
Location
US
i created a webpage years ago that pops up a bookmarked block of text with mouseover. now i find out that when someone clicks on the mouseover text it loads the entire webpage in a new window.

i have searched/read/scanned a lot of the Forums posts and can't seem to find a solution to return no action if someone clicks on the mouseover bookmark link.

i think it is something real simple but i am brain dead from all of the reading. any help would be appreciated.
TIA

here are the 2 sections of code
Code:
<script TYPE="text/javascript" LANGUAGE="JavaScript"><!--
function show(object) {
	if (document.layers && document.layers[object] != null)
	    document.layers[object].visibility = 'visible';
	else if (document.all)
	    document.all[object].style.visibility = 'visible';
}
function hide(object) {
	if (document.layers && document.layers[object] != null)
	    document.layers[object].visibility = 'hidden';
	else if (document.all)
	    document.all[object].style.visibility = 'hidden';
}
//--></script>

<style TYPE="text/css"><!--
.myStyle {
	position: absolute;
	visibility: hidden;
}
//--></style>
AND
Code:
<font color="#000000" face="Arial" size="3"><b><i><a href="#"
    onMouseover="show('myLayer1')" onMouseout="hide('myLayer1')">Our Concept</a></i></b></font>
    <div ID="myLayer1" CLASS="myStyle">
 
I don't see anything that would indicate you popping up a new window, but you might want to try these things just to see what the results are:
Code:
<a href="[!]javascript:void(0)[/!]" onMouseover="show('myLayer1')" onMouseout="hide('myLayer1')" [!]onclick="return false"[/!]>

-kaht

[small] <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <.</B>[/small]
[banghead] [small](He's back)[/small]
 
kaht,

thanks, all i needed was the proper placement of the onclick and to use return false instead of null.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top