Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-05-2012, 11:31 AM   PM User | #1
russco32
New to the CF scene

 
Join Date: Dec 2011
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
russco32 is an unknown quantity at this point
Code works in Firefox and not in IE8, Why?

I've coded a Web page to produce a PopUp window to display a Larger copy of a graphic when a "Hot Spot" is clicked.
It works in Firefox but not in IE8.
Can someone tell me what I've done wrong?

The site is www.mountainsideholdings.com/FAT/Page-2.html

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>FAT Race products</title>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=500,height=500,left = 0,top = 300');");
}
// End -->
<!-- Begin
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//-->
</script>
</head>

<body>
<div>
	<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 width=900 NOF=LY>
		<TR VALIGN=TOP ALIGN=center>
			<TD >
				<img src="Page 02.jpg" width=80% border="0" usemap="#Map3">
			</TD>
		</TR>
	</TABLE>
</div>

<map name="Map3" id="Map3">
	<area shape="rect" coords="33,363,144,393" href="http://mountainsideholdings.com/FAT/Page-1.html" />
	<area shape="rect" coords="33,425,144,455" href="mailto:repengineers@bigpond.com" />
	<area shape="rect" coords="182,141,255,222" value="Open the Popup Window" 
		onMouseOver="javascript:popUp('http://mountainsideholdings.com/FAT/Hammer 1.jpg')">
</map>
</body>
</html>
russco32 is offline   Reply With Quote
Old 03-05-2012, 11:44 AM   PM User | #2
webdev1958
Banned

 
Join Date: Apr 2011
Posts: 656
Thanks: 14
Thanked 69 Times in 69 Posts
webdev1958 can only hope to improve
the w3c validator spits out 35 errors for the url you posted. Fix those first.
webdev1958 is offline   Reply With Quote
Old 03-05-2012, 03:44 PM   PM User | #3
sunfighter
Senior Coder

 
Join Date: Jan 2011
Location: Missouri
Posts: 2,498
Thanks: 18
Thanked 361 Times in 360 Posts
sunfighter is on a distinguished road
Dont use spaces:
<img src="Page 02.jpg"
sunfighter is offline   Reply With Quote
Old 03-07-2012, 02:11 AM   PM User | #4
russco32
New to the CF scene

 
Join Date: Dec 2011
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
russco32 is an unknown quantity at this point
Thanks for the advise. I wasn't aware of a Validation program.
I've corrected all errors, but the problem still remains.
When I click the "Hot Link" in Firefox the Popup appears with the graphic.
When I click the "Hot Link" in IE8, I get the Popup but no Graphic.
The problem appears to be in Line 37.

It's driving me crazy

Can you help?
Thanks in anticipation.

The site is www.mountainsideholdings.com/FAT/Page-2.html

[Code]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>FAT Race products</title>
<script language="JavaScript" type="text/javascript">
<!-- Begin
function popitup(url) {
newwindow=window.open(url,'name','height=600,width=600');
if (window.focus) {newwindow.focus()}
return false;
}
// End -->
<!-- Begin
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//-->
</script>
</head>

<body>
<div>
<table width="900">
<tr valign="top" align="center">
<td >
<img src="Page02.jpg" alt="Page2" width="800" border="0" usemap="#Map3"/> </td>
</tr>
</table>
</div>

<map name="Map3" id="Map3">
<area shape="rect" coords="45,473,156,503" href="mailto:repengineers@bigpond.com" alt="email" />
<area shape="rect" coords="46,406,157,436" href="http://www.mountainsideholdings.com/FAT/Page-1.html" alt="Page-1" />
<area shape="rect" coords="199,154,287,248" onclick="return popitup('http://www.mountainsideholdings.com/FAT/Hammer1.jpg')" alt="Graphic1" />

</map>
</body>
</html>
[Code]
russco32 is offline   Reply With Quote
Old 03-07-2012, 03:47 AM   PM User | #5
telekovar
New Coder

 
Join Date: Mar 2012
Location: Tulsa, OK
Posts: 31
Thanks: 0
Thanked 3 Times in 3 Posts
telekovar is an unknown quantity at this point
I tried your link on Chrome, IE8, Firefox, and Safari... I encountered no problems with any of them. Clear your browser history/ cookies and try again maybe?
telekovar is offline   Reply With Quote
Old 03-07-2012, 05:57 AM   PM User | #6
russco32
New to the CF scene

 
Join Date: Dec 2011
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
russco32 is an unknown quantity at this point
Thanks telekovar.
Wow! I'm glad I'm not going nuts.

I cleared the History etc. but the problem's still there so it looks like it's my machine.
I'm actually using IE9. A Google search reveals other IE9 users are having the odd problem as well. So, I'll look into that.

Has anyone got any other suggestions?

Russ
russco32 is offline   Reply With Quote
Old 03-07-2012, 06:04 AM   PM User | #7
sean3838
New Coder

 
Join Date: Jan 2012
Posts: 90
Thanks: 1
Thanked 13 Times in 13 Posts
sean3838 is an unknown quantity at this point
What is this site for? Your business? Just curious sorry to go off-topic.
sean3838 is offline   Reply With Quote
Old 03-10-2012, 10:52 AM   PM User | #8
telekovar
New Coder

 
Join Date: Mar 2012
Location: Tulsa, OK
Posts: 31
Thanks: 0
Thanked 3 Times in 3 Posts
telekovar is an unknown quantity at this point
Quote:
Originally Posted by russco32 View Post
Thanks telekovar.
Wow! I'm glad I'm not going nuts.

I cleared the History etc. but the problem's still there so it looks like it's my machine.
I'm actually using IE9. A Google search reveals other IE9 users are having the odd problem as well. So, I'll look into that.

Has anyone got any other suggestions?

Russ
Try this stripped down code. If it works, the image-map is your problem (kinda doubtful but worth a shot). Also, maybe try removing the preload part of the script...

Code:
<html>
<head>
<script language="JavaScript" type="text/javascript">
<!-- Begin
function popitup(url) {
newwindow=window.open(url,'name','height=600,width=600');
if (window.focus) {newwindow.focus()}
return false;
}
// End -->
<!-- Begin
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//-->
</script>
</head>
<body>
<br /><br />
<a href="#" onclick="popitup('http://www.mountainsideholdings.com/FAT/Hammer1.jpg')">Make Popup</a>

</body>
</html>

Last edited by telekovar; 03-10-2012 at 10:54 AM..
telekovar is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:19 AM.


Advertisement
Log in to turn off these ads.