ShadowBox working in IE7 but not in Firefox 3 and Safari 3 for Windows XP

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

ShadowBox working in IE7 but not in Firefox 3 and Safari 3 for Windows XP

davesfx
I am trying to implement ShadowBox on my website using the prototype adapter. The site is built using OSCommerce. A link in my page should open a shadowbox window with some HTML content inside. The functionality works flawlessly in IE but not in FF or Safari in which the link behaves like a regular link, taking the user to a separate page.

To see the problem go to
http://www.magicroam.com/product_info.php?cPath=37_43&products_id=89
and click on 'Here' which is located in the middle of the description.
Try doing it with IE and the with FF or Safari.



Here is my code:
There is some PHP code that is necessary for OSCommerce, but the important lines are marked with a  smiley.

Thanks in advance.


<!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>


<script type="text/javascript" src="javascripts/prototype.js"></script><script type="text/javascript" src="javascripts/shadowbox/build/adapter/shadowbox-prototype.js"></script><script type="text/javascript" src="javascripts/shadowbox/build/shadowbox.js"></script><script type="text/javascript"> Shadowbox.loadSkin('classic', 'javascripts/shadowbox/src/skin'); // use the "classic" skin Shadowbox.loadLanguage('en', 'javascripts/shadowbox/build/lang'); // use the English language Shadowbox.loadPlayer(['img', 'qt', 'html'], 'javascripts/shadowbox/build/player'); // use img and qt players Shadowbox.loadPlayer(['flv', 'html', 'iframe', 'img', 'qt', 'swf', 'wmp'], 'javascripts/shadowbox/build/player'); window.onload = Shadowbox.init; </script>
<title>MagicRENTAL 15</title>
<meta name="description" content="Benefits of this package: Rent an unlocked mobile phone with our MagicSIM for your business or pleasure traveling. The...">
<meta name="keywords" content="magicroam, global, reach, simple, touch, connection, everywhere, benefits, this, package:, rent, unlocked, mobile, phone, with, our, magicsim, your, business, pleasure, traveling, will">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<base href="http://www.magicroam.com/">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<script language="javascript"><!-- function popupWindow(url) { window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150') } //--></script></head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">

     


<link href="../stylesheet.css" rel="stylesheet" type="text/css" />


      <script src="../images/AC_RunActiveContent.js" type="text/javascript"></script>

 
 
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<script type="text/javascript"> <!-- 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];}} } function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc; } function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x && d.getElementById) x=d.getElementById(n); return x; } function MM_swapImage() { //v3.0 var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} } //--> </script><body onLoad="MM_preloadImages('../images/images/company_clicked.jpg','../images/images/products_clicked.jpg','../images/images/services_clicked.jpg','../images/images/support_clicked.jpg','../images/images/contact_us_clicked.jpg')">
<div align="center">
  <script language="JavaScript" src="includes/functions.js"></script>    <script language="JavaScript" src="includes/obj.js"></script>    <script type="text/javascript" language="JavaScript1.2" src="/test_menus/newmenu/stmenu.js"></script>  <script type="text/javascript" language="JavaScript1.2" src="/test_menus/header_menu/stmenu.js"></script> 
                                             
<map name="Map" id="Map"><area shape="rect" coords="2,25,117,141" href="index.php" target="_self" alt="Home" onMouseOver="MM_swapImage('Image1','','../images/images/company_clicked.jpg',1)" onMouseOut="MM_swapImgRestore()"  />
</map>
<map name="Map2" id="Map2"><area shape="rect" coords="-1,25,107,140" href="view_products.php" target="_self" alt="Our Products" onMouseOver="MM_swapImage('Image2','','../images/images/products_clicked.jpg',1)" onMouseOut="MM_swapImgRestore()" />
</map>
<map name="Map3" id="Map3"><area shape="rect" coords="1,25,127,141" href="services.php" target="_self" alt="Services" onMouseOver="MM_swapImage('Image5','','../images/images/services_clicked.jpg',1)" onMouseOut="MM_swapImgRestore()" />
</map>
<map name="Map4" id="Map4">
  <area shape="rect" coords="-2,26,103,141" href="support.php" target="_self" alt="Support" onMouseOver="MM_swapImage('Image3','','../images/images/support_clicked.jpg',1)" onMouseOut="MM_swapImgRestore()" />
</map>
<map name="Map5" id="Map5">
<area shape="rect" coords="0,26,110,140" href="contact_us.php" target="_self" alt="Contact MagicRoam" onMouseOver="MM_swapImage('Image4','','../images/images/contact_us_clicked.jpg',1)" onMouseOut="MM_swapImgRestore()" />
</map>
<map name="Map6" id="Map6"><area shape="rect" coords="575,2,749,160" href="login.php" target="_self" alt="Login" />
<area shape="rect" coords="57,46,174,103" href="coverage.php" target="_self" alt="Coverage" />
</map>

                     
      <center>
                       
             
   
           
 
     
                         
                                           
        <script type="text/javascript" language="JavaScript1.2"> <!-- stm_bm(["menu106c",700,"","/test_menus/newmenu/blank.gif",0,"","",0,2,0,0,1000,1,0,0,"","",0,0,1,2,"default","hand",""],this); stm_bp("p0",[0,4,0,0,0,3,0,7,100,"",-2,"",-2,90,2,5,"#006699","#FFFFFF","",3,0,0,"#FFFFFF"]); stm_ai("p0i0",[0,"Home","","",-1,-1,0,"index.php","_self","","","","",0,0,0,"","",0,0,0,1,2,"#F5F5FF",0,"#FFFFFF",0,"","",3,3,1,3,"#FFFFFF #E7E6ED #BBB7C7 #FFFFFF","#FFFFFF #FFFFFF #66CC00","#333333","#666666","bold 8pt Arial","bold 8pt Arial",0,0],150,20); stm_aix("p0i1","p0i0",[0,"Buy & Recharge","","",-1,-1,0,"view_products.php","_self","","","","",0,0,0,"/test_menus/newmenu/arrow_r.gif","/test_menus/newmenu/arrow_r.gif",7,7],150,20); stm_bp("p1",[1,4,0,0,0,3,0,0,100,"stEffect(\"slip\")",-2,"stEffect(\"slip\")",-2,30,2,5,"#006699","transparent","",3,0,0,"#000000"]); stm_aix("p1i0","p0i0",[0,"View Products","","",-1,-1,0,"view_products.php"],150,20); stm_aix("p1i1","p0i0",[0,"Add Airtime","","",-1,-1,0,"view_products_at.php"],150,20); stm_ep(); stm_aix("p0i2","p0i1",[0,"Rates & Coverage","","",-1,-1,0,"rate.php"],150,20); stm_bpx("p2","p1",[]); stm_aix("p2i0","p0i0",[0,"Calculator","","",-1,-1,0,"rate.php"],150,20); stm_aix("p2i1","p0i0",[0,"Where to go?","","",-1,-1,0,"coverage.php"],150,20); stm_aix("p2i2","p0i0",[0,"Customer Locations","","",-1,-1,0,"magic_map.php"],150,20); stm_ep(); stm_aix("p0i3","p0i1",[0,"My Account","","",-1,-1,0,"account.php"],150,20); stm_bpx("p3","p1",[1,4,0,0,0,3,0,0,100,"stEffect(\"slip\")",-2,"stEffect(\"slip\")",-2,65]); stm_aix("p3i0","p0i0",[0,"Overview","","",-1,-1,0,"account.php"],150,20); stm_aix("p3i1","p0i0",[0,"Edit Account","","",-1,-1,0,"account_edit.php"],150,20); stm_aix("p3i2","p0i0",[0,"Edit Address","","",-1,-1,0,"address_bookr.php"],150,20); stm_aix("p3i3","p0i0",[0,"Password","","",-1,-1,0,"account_password.php"],150,20); stm_aix("p3i4","p0i0",[0,"Order History","","",-1,-1,0,"account_history.php"],150,20); stm_aix("p3i5","p0i0",[0,"Notifications","","",-1,-1,0,"account_notifications.php"],150,20); stm_aix("p3i6","p0i0",[0,"Newsletter","","",-1,-1,0,"account_newsletters.php"],150,20); stm_aix("p3i7","p0i0",[0,"Log Off","","",-1,-1,0,"logoff.php"],150,20); stm_ep(); stm_aix("p0i4","p0i1",[0,"Our Company","","",-1,-1,0,"infocenter.php"],150,20); stm_bpx("p4","p1",[1,4,0,0,0,3,0,0,100,"stEffect(\"slip\")",-2,"stEffect(\"slip\")",-2,65]); stm_aix("p4i0","p0i0",[0,"Who we are","","",-1,-1,0,"infocenter.php"],150,0); stm_aix("p4i1","p4i0",[0,"News","","",-1,-1,0,"infonews.php"],150,0); stm_aix("p4i2","p0i0",[0,"How To Select","","",-1,-1,0,"how_to_select.php"],150,0); stm_aix("p4i3","p0i0",[0,"Get Started","","",-1,-1,0,"how_to_install.php"],150,0); stm_aix("p4i4","p0i0",[0,"Global SIM Card","","",-1,-1,0,"global_SIM_card.php"],150,0); stm_aix("p4i5","p0i0",[0,"Save on Calls","","",-1,-1,0,"international_calling.php"],150,0); stm_aix("p4i6","p0i0",[0,"Visit the BLOG","","",-1,-1,0,"http://magicroam.blogspot.com/","_blank"],150,0); stm_aix("p4i7","p0i0",[0,"Contact Us","","",-1,-1,0,"contact_us.php"],150,0); stm_ep(); stm_ep(); stm_em(); //--> </script>
         
   
   
           
      </div>
<script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script><script type="text/javascript"> var pageTracker = _gat._getTracker("UA-4045982-2"); pageTracker._initData(); pageTracker._trackPageview(); </script>








 
                   
   
               




               
   
               
       
       
            <form name="cart_quantity" action="http://www.magicroam.com/index.php?cPath=37_43&products_id=89&sort=2a&action=buy_now" method="post"> 
       
                                                                                             
                                                                                         
                                             
                       
                                               
                 
<div id="news" style="background-color:#dee8f6">
MagicRENTAL 15</div>
<div id="news" style="background-color:#dee8f6">$15.00<br> </div>
                                                         
<script language="javascript"><!-- document.write('<a href="#"><img src="images/MagicRENTAL15.JPG" border="0" alt="MagicRENTAL 15" title=" MagicRENTAL 15 " width="230" height="251" hspace="5" vspace="5"><br>Click to enlarge</a>'); //--></script><noscript>
MagicRENTAL 15<br>Click to enlarge</noscript>
             
          <p><p align="justify"><strong>Benefits of this package:</strong></p><p align="justify">Rent an unlocked mobile phone with our MagicSIM for your business or pleasure traveling. The phone will be shipped to your hands without any activation costs. After you receive the phone you will be able to  fully use the features of the MagicSIM plan including call forwarding, number purchase, voicemail, and SMS. The phone will allow you to make and receive calls with no roaming charges and at extremely low costs. Once your traveling is done and you ship the device back to us, we will charge your credit card for the minutes used. You can check our rates by clicking


a href="rate_rent.php" rel="shadowbox;width=777;height=325">Here /a.

NOTE: I LEFT THE A-TAGS UNCLOSED TO PREVENT IT FROM BEING DISPLAYED AS A LINK

It's that easy! You can also keep track of your minutes online using your ID and password provided by us. </p><p align="justify">This plan includes an activated, unlocked mobile device and accessories for up to 15 days of traveling. Days are only billed during actual travel time. Shipping days are not included. </p></p>
       
                                       
                                                                                                                                                                       
ReviewsTell a Friend<input type="hidden" name="products_id" value="89"><input type="image" src="includes/languages/english/images/buttons/button_in_cart.gif" border="0" alt="Add to Cart" title=" Add to Cart ">
       
</form>






                       
<div align="center">
           
               
        <br />
        Home | Company Info | Terms And Conditions | Privacy Policy | Contact Us | Visit Our BLOG<br><br>1-800-960-4549<br>Copyright © 2008 - MagicRoam.com - All Rights Reserved<br>Operated by Magic Telecom LLC<div>       
</div>



<p>

<br>
</body>
</html>
Reply | Threaded
Open this post in threaded view
|

Re: ShadowBox working in IE7 but not in Firefox 3 and Safari 3 for Windows XP

Wizzud
The first thing to do is get a document that at least goes partway towards resembling a proper HTML document! Like, there should only be one BODY start tag!
Then, don't use both window.onload and body.onload.
Then, if Shadowbox still doesn't work, we can look again?
Combine literacy with curiosity and a whole world of information opens up to you