Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New to the CF scene
    Join Date
    Dec 2011
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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>

  • #2
    Banned
    Join Date
    Apr 2011
    Posts
    656
    Thanks
    14
    Thanked 69 Times in 69 Posts
    the w3c validator spits out 35 errors for the url you posted. Fix those first.

  • #3
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,092
    Thanks
    23
    Thanked 593 Times in 592 Posts
    Dont use spaces:
    <img src="Page 02.jpg"

  • #4
    New to the CF scene
    Join Date
    Dec 2011
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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]

  • #5
    New Coder
    Join Date
    Mar 2012
    Location
    Tulsa, OK
    Posts
    31
    Thanks
    0
    Thanked 3 Times in 3 Posts
    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?

  • #6
    New to the CF scene
    Join Date
    Dec 2011
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  • #7
    New Coder
    Join Date
    Jan 2012
    Posts
    97
    Thanks
    1
    Thanked 13 Times in 13 Posts
    What is this site for? Your business? Just curious sorry to go off-topic.

  • #8
    New Coder
    Join Date
    Mar 2012
    Location
    Tulsa, OK
    Posts
    31
    Thanks
    0
    Thanked 3 Times in 3 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •