JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old April 22nd, 2005, 12:14 PM
ammwebmaster2 ammwebmaster2 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Posts: 2 ammwebmaster2 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 5 m 18 sec
Reputation Power: 0
Unhappy Description Link Window won't open in IE or Mozilla


Please help. I am using a JavaScript to have a popup description window display when you hover over the link. And the link being a valid as well. Please help!!!! I am new to JavaScript and don't know why it won't work. It was working in Mozilla but then yesterday I changed some things and now it is not working in either!!! Again any information to shed some light on this would be appreciated. Here is the code I am using.

Code:
 
 
<<A href="mailto:%@LANGUAGE="VBSCRIPT">%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Contents Page / What's New | amm.org</title>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
	document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
//   ##############  SIMPLE  BROWSER SNIFFER
var level=null
if(document.getElementById) level="DOM";//most browsers
else if(document.all) level="ie4";
else if(document.layers) level="NN4";
else alert("Old Browser");//No manipulation available
//  #########  popup text 
descarray = new Array(
"This site has some of the greatest scripts around!",
"These popups can have varying width. It is dependant upon the text message.",
"You can have <b>two</b> lines <br>and HTML content.",
"You can also have images in here like this:<br><img src=greenbar.gif>",
"Choose from several <br>designs, including a card <br>to send to someone in the <br>military, each with a spiritual <br>greeting, and space to <br>add your own message.",
"Honor or commemorate <br>that special person in <br>your life with a Tribute <br>Gift to our Lady’s <br>Association. You and <br>your loved one will <br>share in the prayers of <br>the Vincentian community.",
"</center>Lastly, you can have links like these:<br><a href='http://javascript.internet.com/'>JavaScript Source</a><br><a href='http://javascript.internet.com/'>JavaScript Source</a><br><a href='http://javascript.internet.com/'>JavaScript Source</a><br>With a change in the onmouseout event handler."
);
overdiv="0"; 
//  #########  CREATES POP UP BOXES 
function popLayer(a){
if(!descarray[a]){descarray[a]="<font color=red>This popup (#"+a+") isn't setup correctly - needs description</font>";}
if (navigator.family == "gecko") {pad="0"; bord="1 bordercolor=black";}
else {pad="1"; bord="0";}
desc =    "<table cellspacing=0 cellpadding="+pad+" border="+bord+"  bgcolor=000000><tr><td>\n"
 +"<table cellspacing=0 cellpadding=3 border=0 width=100%><tr><td bgcolor=ffffdd><center><font size=-1>\n"
 +descarray[a]
 +"\n</td></tr></table>\n"
 +"</td></tr></table>";
if(navigator.family =="nn4") {
 document.object1.document.write("desc");
 document.object1.document.close();
 document.object1.left=x+15;
 document.object1.top=y-5;
 }
else if(navigator.family =="ie4"){
 document.getElementById("object1").innerHTML;
 document.getElementById("object1").style.left=x+15;
 document.getElementById("object1").style.top=y-5;
 }
else if(navigator.family =="gecko"){
 document.getElementById("object1").innerHTML=desc;
 document.getElementById("object1").style.left=x+15;
 document.getElementById("object1").style.top=y-5;
 }
}
function hideLayer(){
if (overdiv == "0") {
 if(navigator.family =="nn4") {eval(document.object1.top="-500");}
 else if(navigator.family =="ie4"){document.getElementById("object1").style.top="-500"}
 else if(navigator.family =="gecko") {document.getElementById("object1").style.top="-500";}
 }
}
 //  ########  TRACKS MOUSE POSITION FOR POPUP PLACEMENT
var isNav = (navigator.appName.indexOf("Netscape") !=-1);
function handlerMM(e){
x = (isNav) ? e.pageX : event.clientX + document.body.scrollLeft;
y = (isNav) ? e.pageY : event.clientY + document.body.scrollTop;
}
if (isNav){document.captureEvents(Event.MOUSEMOVE);}
document.onmousemove = handlerMM;
//  End -->
</script>
</head>
<body bgcolor="#7393BC" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="712" border="0" cellpadding="5" bgcolor="#F2FBFF">
<tr>
<td><!--#include file="ammheader.asp"-->
</td></tr>
  <tr>
	<td bgcolor="#F2FBFF" scope="row"><table width="710" border="0" cellpadding="0" cellspacing="0">
	  <tr>
		<td><p align="left">The Association of the Miraculous Medal brings Mary conceived without sin to the Catholics of North America. She shows God&rsquo;s fatherly care and her own motherly concern. The National Shrine of the Miraculous Medal is our center of prayer.
		  <p align="left">Please browse through the topics to the side and below to learn about the Miraculous Medal, the National Shrine of the Miraculous Medal in Perryville, Missouri, USA, and some of the services offered by the Association of the Miraculous Medal.		   
		  <p align="left">		  
		  <p align="left"></td>
		<td><div align="center">
		  <img src="../images/templateimgs/eastermary2.jpg"></div></td>
	  </tr>
	  <tr>
		<td><font face="Arial, Helvetica, sans-serif" color="#CC3300" size="5"><b>This Week&rsquo;s Features</b></font> <br>
Looking for <a href="http://home.amm.org/barrens" target="_blank">St. Mary's of the Barrens construction</a>? </td>
		<td>&nbsp;</td>
	  </tr>
	</table>	  
	  <p><br>
		<b><font face="Arial, Helvetica, sans-serif" color="#CC3300" size="5">Regular Features</font></b>
	
	  <table border="1" cellPadding="6" cellSpacing="2" borderColorLight="#ccccff">
	  <tr>
		<td width="524" height="112" background="../images/templateimgs/thoughtsbkgd.jpg"><i><font color="#006699" size="4"><b>Spiritual Thought of the Week</b></font></i> - 
		  <i><font face="Times New Roman, Times, serif">"If God is the center of your life, no words will be needed. Your mere presence will touch their hearts."</font></i> <br>
<div align="right">
  &hellip;Saint Vincent de Paul</div><br>
	<div align="left"><b><font color="#006699" size="4">Spiritual Thoughts <a href="<A href="http://www.amm.org/thoughts/archive/first2605.htm">Archive</a>.</font">http://www.amm.org/thoughts/archive/first2605.htm">Archive</a>.</font> </b></div> </td>
		<td width="152" background="../images/templateimgs/thoughtsbgsm.jpg">Posted April 6, 2005 </td>
	  </tr>
	  <tr>
		<td><strong> Read Father Shelby&rsquo;s <a href="ae2-2005.htm">homily for the 2nd Sunday of Easter</a>, April 3, 2005 with a remembrance of Pope John Paul II.
			<!--	   Father Shelby has not prepared a homily for Sunday, October 24, 2004. -->
			<!--		However, he suggests his homily on prayer for the <a -->
			<!--		href="<A href="http://www.amm.org/homily/co302001.htm">homily">http://www.amm.org/homily/co302001.htm">homily  -->
			<!--		for the Thirtieth Sunday of Ordinary Time</a>, October  -->
			<!--		28, 2001.  -->
		  </strong>
			<P><strong>For past homilies, please refer to Father Shelby&rsquo;s <a href="<A href="http://www.amm.org/homily/index.htm">homily">http://www.amm.org/homily/index.htm">homily index</a>.</strong></td>
		<td>Posted April 3, 2005</td>
	  </tr>
	  <tr>
		<td><b>Be sure to check this week&rsquo;s <img alt="animated new" src="http://www.amm.org/images/animated.gif" align="top" width="40" height="30"> <a href="<A href="http://www.amm.org/favor/favors.htm">letters">http://www.amm.org/favor/favors.htm">letters about answered prayers</a>.</b></td>
		<td>Posted April 11, 2005</td>
	  </tr>
	</table>
	
	  <br>
	 
	  <table width="703" border="0" cellpadding="2" cellspacing="10">
		<tr bgcolor="#003399">
		  <td width="332" height="30"><div align="center"><font size="5"><b><font color="#FFFFFF">Past Features </font></b></font></div></td>
		  <td width="370"><div align="center"><b><font color="#FFFFFF" size="5">Special Features </font></b></div></td>
		</tr>
		<tr>
		  <td height="84" bgcolor="#E8F7EF"><div align="center"><a href="<A href="http://www.amm.org/bulletins/2005/apr/apr05.pdf">April">http://www.amm.org/bulletins/2005/apr/apr05.pdf">April Bulletin Newsletter</a><br>
				<a href="<A href="http://www.amm.org/appeals/2005/maypro/p5.htm">May">http://www.amm.org/appeals/2005/maypro/p5.htm">May Procession</a><br>
			  <a href="<A href="http://www.amm.org/appeals/2005/annun/15.htm">Annunciation">http://www.amm.org/appeals/2005/annun/15.htm">Annunciation Message</a> </div></td>
 
 <div id="object1" style="position:absolute; background-color:FFFFDD;color:black;border-color:black;border-width:20; left:25px; top:-100px; z-index:3;" onmouseover="overdiv=1;" onmouseout="overdiv=0; setTimeout('hideLayer()',1000)">
pop up description layer
</div>		
   
<!--  THE TEXT FOR THE POPUP DESCRIPTIONS ARE ON LINE 12  -->
 
<td bgcolor="#FFFFEC"><div align="center">
  <div align="center"><a href="http://home.amm.org/ecard/default.asp" onMouseOver="popLayer(4)" onMouseOut="hideLayer()"><font size=-1 face=arial><b>
  Send an e-card to brighten up someone's day
   </b></font></a><br> 
			  
	 
	   Special Occasion Gifts<br>	   
 </div>
		  
	<div align="center">
		 <div align="center"><a href="http://home.amm.org/submissions/tribute" onMouseOver="popLayer(5)" onMouseOut="hideLayer()"><font size=-1 face=arial><b>
   Remember Someone with a Tribute Gift
		</b></font></a><br> 
		  </div></td>
		</tr>
	  </table>
	<p>&nbsp;<!--#include file="ammfooter.asp"--></p></td>
  </tr>
</table>
</table>
</body>

Reply With Quote
  #2  
Old April 22nd, 2005, 01:27 PM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 14 m 9 sec
Reputation Power: 8
The code you posted looks a little skewed...

<a href="<A href="http://www.amm.org/appeals/2005/maypro/p5.htm">May">http://www.amm.org/appeals/2005/maypro/p5.htm">May Procession</a>

Is it possible to post a dumbed down example?

Perhaps with just the Javascript and a link to demonstrate what the final output would/should look like. And without the ASP code.

Reply With Quote
  #3  
Old April 22nd, 2005, 01:51 PM
ammwebmaster2 ammwebmaster2 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Posts: 2 ammwebmaster2 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 5 m 18 sec
Reputation Power: 0
Unhappy Link Description Window won't open in IE or Mozilla

Thank you so much for responding. I hope this helps!!!!

Here is just the JavaScript code and a link to where I got the script to show how the window is supposed to work. It works similar to the little yellow windows in the forum work. You hover over a post and it pops up a small yellow window that displays the post in greater detail. Except I want it to hover over the link and pop up the window and the link be a valid link to a page as well. The link to where I got the script is: http://javascript.internet.com/navigation/pop-up-link-with-description.html
I wanted the one for a really long description.
Code:
 <!-- TWO STEPS TO INSTALL POP-UP LINK WITH DESCRIPTION:
 
   1.  Copy the coding into the HEAD of your HTML document
   2.  Add the last code into the BODY of your HTML document  -->
 
 <!-- STEP ONE: Paste this code into the HEAD of your HTML document  -->
 
 <HEAD>
 
 <SCRIPT LANGUAGE="JavaScript">
 
 <!-- This script and many more are available free online at -->
 <!-- The JavaScript Source!! http://javascript.internet.com -->
 <!-- Original:  Patrick Lewis (gtrwiz@aol.com) -->
 <!-- Web Site:  http://www.patricklewis.net -->
 <!-- Begin
 //   ##############  SIMPLE  BROWSER SNIFFER
 if (document.layers) {navigator.family = "nn4"}
 if (document.all) {navigator.family = "ie4"}
 if (window.navigator.userAgent.toLowerCase().match("gecko")) {navigator.family = "gecko"}
 
 //  #########  popup text 
 descarray = new Array(
 "This site has some of the greatest scripts around!",
 "These popups can have varying width. It is dependant upon the text message.",
 "You can have <b>two</b> lines <br>and HTML content.",
 "You can also have images in here like this:<br><img src=greenbar.gif>",
 "You can put in a really long <br>description if it is nessary to <br>explain something in detail, <br>like a warning about content <br>or privacy.",
 "</center>Lastly, you can have links like these:<br><a href='http://javascript.internet.com/'>JavaScript Source</a><br><a href='http://javascript.internet.com/'>JavaScript Source</a><br><a href='http://javascript.internet.com/'>JavaScript Source</a><br>With a change in the onmouseout event handler."
 );
 
 overdiv="0";
 //  #########  CREATES POP UP BOXES 
 function popLayer(a){
 if(!descarray[a]){descarray[a]="<font color=red>This popup (#"+a+") isn't setup correctly - needs description</font>";}
 if (navigator.family == "gecko") {pad="0"; bord="1 bordercolor=black";}
 else {pad="1"; bord="0";}
 desc = 	  "<table cellspacing=0 cellpadding="+pad+" border="+bord+"  bgcolor=000000><tr><td>\n"
 	+"<table cellspacing=0 cellpadding=3 border=0 width=100%><tr><td bgcolor=ffffdd><center><font size=-1>\n"
 	+descarray[a]
 	+"\n</td></tr></table>\n"
 	+"</td></tr></table>";
 if(navigator.family =="nn4") {
 	document.object1.document.write(desc);
 	document.object1.document.close();
 	document.object1.left=x+15;
 	document.object1.top=y-5;
 	}
 else if(navigator.family =="ie4"){
 	object1.innerHTML=desc;
 	object1.style.pixelLeft=x+15;
 	object1.style.pixelTop=y-5;
 	}
 else if(navigator.family =="gecko"){
 	document.getElementById("object1").innerHTML=desc;
 	document.getElementById("object1").style.left=x+15;
 	document.getElementById("object1").style.top=y-5;
 	}
 }
 function hideLayer(){
 if (overdiv == "0") {
 	if(navigator.family =="nn4") {eval(document.object1.top="-500");}
 	else if(navigator.family =="ie4"){object1.innerHTML="";}
 	else if(navigator.family =="gecko") {document.getElementById("object1").style.top="-500";}
 	}
 }
 
 //  ########  TRACKS MOUSE POSITION FOR POPUP PLACEMENT
 var isNav = (navigator.appName.indexOf("Netscape") !=-1);
 function handlerMM(e){
 x = (isNav) ? e.pageX : event.clientX + document.body.scrollLeft;
 y = (isNav) ? e.pageY : event.clientY + document.body.scrollTop;
 }
 if (isNav){document.captureEvents(Event.MOUSEMOVE);}
 document.onmousemove = handlerMM;
 //  End -->
 </script>
 
 </HEAD>
 
 <!-- STEP TWO: Copy this code into the BODY of your HTML document  -->
 
 <BODY>
 
 <div id="object1" style="position:absolute; background-color:FFFFDD;color:black;border-color:black;border-width:20; visibility:show; left:25px; top:-100px; z-index:+1" onmouseover="overdiv=1;"  onmouseout="overdiv=0; setTimeout('hideLayer()',1000)">
 pop up description layer
 </div>
 
 <!--  THE TEXT FOR THE POPUP DESCRIPTIONS ARE ON LINE 12  -->
 
 <a href="http://javascript.internet.com" onMouseOver="popLayer(0)" onMouseOut="hideLayer()"><font size=-1 face=arial><b>
 THE JavaScript Source
 	</b></font></a><br>
 
 <a href="#" onMouseOver="popLayer(1)" onMouseOut="hideLayer()"><font size=-1 face=arial><b>
 Variable width
 	</b></font></a><br>
 
 <a href="#" onMouseOver="popLayer(2)" onMouseOut="hideLayer()"><font size=-1 face=arial><b>
 Double line popup
 	</b></font></a><br>
 
 <a href="#" onMouseOver="popLayer(3)" onMouseOut="hideLayer()"><font size=-1 face=arial><b>
 Image sample
 	</b></font></a><br>
 
 <a href="#" onMouseOver="popLayer(4)" onMouseOut="hideLayer()"><font size=-1 face=arial><b>
 Really long description
 	</b></font></a><br>
 
 <a href="#" onMouseOver="popLayer(5)" onMouseOut="setTimeout('hideLayer()',2000)"><font size=-1 face=arial><b>
 Persistant with links
 	</b></font></a><br>
 
 <p><center>
 <font face="arial, helvetica" size"-2">Free JavaScripts provided<br>
 by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
 </center><p>
 
 <!-- Script Size:  5.08 KB -->
 

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJavaScript Development > Description Link Window won't open in IE or Mozilla


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT