473,406 Members | 2,343 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Javascript working on FF but not on IE

Hi guys,

following url works in Fire Fox but not On IE.

http://www.dell.com/content/topics/topic.aspx/global/hybrid/snp/en/storage_type?c=us&cs=19&l=en&ModelSelection=121317 &s=dhs




Expand|Select|Wrap|Line Numbers
  1.  
  2. <![CDATA[
  3. <html>
  4. <head>
  5. <title>Storage & Servers</title>
  6. <style type="text/css">
  7. body { font-family: arial;
  8.   font-size:9pt; line-height:1.3}
  9. @media all{
  10.   h1 { font-size:16pt }    
  11.   ul { 
  12.     margin:.5em 2em 1.4em 0; 
  13.     padding:0 
  14.     }
  15. ul li    { 
  16.     margin:0 0 .4em 1.5em;
  17.     list-style-type:point 
  18.     }
  19. }
  20. #imageDiv { position:absolute;left:430px;top:370px;z-index:0 }
  21.  
  22. #ContDiv { position:absolute;left:205px;top:100px;z-index:0 }
  23.  
  24. </style>
  25. <script language="JavaScript">
  26.  
  27. var width = screen.width;
  28. var height = screen.height;
  29. var origWidth, origHeight;
  30. if (document.layers) {
  31.     origWidth = window.innerWidth; origHeight = window.innerHeight;
  32.     window.onresize = function() { if (window.innerWidth != origWidth || window.innerHeight != origHeight) history.go(0); }
  33. }
  34.  
  35. var page_loaded; 
  36. function initCont() {
  37.   page_loaded = true; 
  38.   writeImage('imageDiv','ContDiv', origMsg, origImg, ttleMsg); 
  39. }
  40.  
  41.  
  42.  
  43. function writeCont(id, sHTML, s1HTML) {
  44.  
  45.   var lay = (document.getElementById)? document.getElementById(id): (document.all)? document.all[id]: (document.layers)? document.layers[id]: null;
  46.   var cntct = '<table cellspacing="0" cellpadding="5" border="0" width="340" style="border-style:solid;border-color:#efefef;border-width:2px;font-size:9pt;"><tr><td bgcolor="#efefef"><b>'+s1HTML+'</b></td></tr></table><table cellspacing="0" cellpadding="" border="0" width="340" style="border-color:#aaaaaa #eeeeee #eeeeee #eeeeee;border-style:solid solid solid;border-width:3px 2px 2px 2px;font-size:9pt;"><tr valign="top"><td width="340" height="365" style="padding:5px;">' + sHTML + '</td></tr></table>';
  47.   if (typeof lay.innerHTML!="undefined") {
  48.       lay.innerHTML = cntct;
  49.   } else if (document.layers) {
  50.             lay.document.write(cntct);
  51.             lay.document.close();
  52.   }
  53.  
  54.  
  55.  
  56. function writeImage(id,cntid,sHTML,img,s1HTML) {
  57.  
  58. //if(navigator.appName == "Microsoft Internet Explorer" || navigator.appName == "Netscape")
  59. //{
  60. //    if((navigator.appVersion.indexOf("MSIE") !=-1) || (Number(navigator.appVersion.charAt(0)) >= 4))
  61. //    {
  62. //        var indx = navigator.appVersion.indexOf("MSIE");
  63. //        var ver = Number(navigator.appVersion.substr((indx+5),3));
  64. //        if(ver >= 6 || (Number(navigator.appVersion.charAt(0)) >= 4))
  65. //        {
  66.  
  67.   if (!page_loaded) return;
  68.  
  69.   var lay = (document.getElementById)? document.getElementById(id): (document.all)? document.all[id]: (document.layers)? document.layers[id]: null;
  70.   if (!lay) return;
  71.  
  72.   var imagecnt = '<IMG SRC="'+ img + '" NAME="sub1" WIDTH="100" HEIGHT="100" BORDER="0">';
  73.   if (typeof lay.innerHTML!="undefined") {
  74.       lay.innerHTML = imagecnt;
  75.   } else if (document.layers) {
  76.             lay.document.write(imagecnt);
  77.             lay.document.close();
  78.   }
  79.  
  80. writeCont(cntid, sHTML,s1HTML)
  81. //        } 
  82. //    }
  83. //}
  84.  
  85. }
  86.     function getParameter (queryString, parameterName) 
  87.     {
  88.         var tempStr = new String(queryString);
  89.         var parameterName = parameterName + "=";
  90.         if ( tempStr.length > 0 ) 
  91.         {
  92.             var begin = tempStr.indexOf (parameterName);
  93.  
  94.             if ( begin != -1 ) 
  95.             {
  96.                 begin += parameterName.length;
  97.                 end = tempStr.indexOf ( "&" , begin );
  98.                 if ( end == -1 ) { end = tempStr.length }
  99.                 return unescape ( tempStr.substring ( begin, end ) );
  100.             }
  101.             return "null";
  102.         }
  103.     }
  104.  
  105.     function go(cat) 
  106.     {
  107.         var catid = new String(cat);
  108.  
  109.         var qString = window.location;
  110.         var csName = getParameter(qString,'cs')
  111.         var sysName = getParameter(qString,'ModelSelection');
  112.         sysName = sysName +"&category_id="+catid;
  113.         var writeString;
  114.         //writeString = "http://accessories.us.dell.com/sna/DellItemsProductListing.aspx?Page=DellItemsProductListing.aspx&spagenum=1&items_per_page=25&image_flag=True&show_summary=True&category_id=5683&ModelSelection=166493&l=en&c=us&cs=19";
  115.         //writeString = "http://accessories.us.dell.com/sna/DellItemsProductListing.aspx?c=us&l=en&fe=category_id&ModelSelection=166493&cs=19&ManufactSelection=" + sysName;
  116.         writeString = "http://accessories.us.dell.com/sna/DellItemsProductListing.aspx?c=us&l=en&cs="+ csName + "&ModelSelection=" + sysName;
  117.         //writeString = "http://accessories.us.dell.com/sna/productlisting.aspx?c=us&cs=19&l=en&s=dhs&k=" + sysName;
  118.         window.location = writeString;
  119.     }
  120.  
  121.  
  122.  
  123. // Variables for Layers
  124. var origMsg = '<p>Dell branded storage solutions are tested and certified compatible with your Dell PC.</p><p>They will be supported by Dell's award winning technical service and support and covered under the remaining system limited warranty<sup>1</sup>.</p><p>While the third party products we offer are also of excellent quality, service and support for those products are provided by the individual manufacturers.</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p>';
  125. var origImg = 'http://img.dell.com/images/global/shared/storage_hdd_watermark.jpg';
  126. var ttleMsg = 'Why Buy Dell Storage Devices?';
  127.  
  128. var dfltMsg = '<p>Dell branded storage solutions are tested and certified compatible with your Dell PC.</p><p>They will be suppoted by Dells award winning technical support and covered under the remaining system limited warranty<sup>1</sup> or one year from date of purchase, whichever is longer.</p><p>While the third party products we offer are also of excellent quality, support and warranty services for those products are provided by the individual manufacturers.</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p>';
  129. var dfltimg = 'http://img.dell.com/images/global/shared/storage_hdd_watermark.jpg';
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137. var msg8 = '<p>A DVD+RW<sup>2</sup> drive brings you the latest in DVD technology.  Use it to store up to 4.7GB on a single layer disk or 8.5GB on dual layer media.  A DVD+RW<sup>2</sup> drive offers you a wide range of usage by reading & recording to DVD+R, DVD+RW<sup>2</sup>, CD-R and CD-RW media.</p><p>A single layer DVD (4.7GB) will hold about:<br/>* 800 MP3 songs, or<br/>* 120 minutes of MPEG video, or<br/>* 2800 Digital Photos (2.4Mpixel), or<br/>* 200 Digital Photos (6Mpixel)</p><p>For more information review the <a href="http://www1.us.dell.com/content/learnmore/learnmore.aspx?c=us&l=en&s=gen&~id=storage_sitelet&~mode=popup" target="_blank"> storage glossary.</a></p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p>';
  138. var img8 = 'http://img.dell.com/images/global/shared/storage_ext_dvdrw.jpg';
  139. var ttleMsg8 = 'What is an External DVD-RW?';
  140.  
  141.  
  142. </script>
  143.  
  144. </head>
  145. <body onload="initCont()">
  146.  
  147. <br><br/>
  148. <font size="2">
  149. <div>List of storage types:</div>
  150. <br><b>Disk Drives</b><br/>
  151. <img src="http://img.dell.com/images/global/brand/ui/secondary.gif" width="4" height="17"> <a onclick="go('5694');" style="cursor:hand" onmouseover="writeImage('imageDiv','ContDiv', msg1, img1, ttleMsg1)">Hard Disk Drives</a><br/>
  152. <img src="http://img.dell.com/images/global/brand/ui/secondary.gif" width="4" height="17"> <a onclick="go('5693');" style="cursor:hand" onmouseover="writeImage('imageDiv','ContDiv', msg2, img2, ttleMsg2)">Floppy Disk Drives</a><br/><br/>
  153.  
  154. <b>Compact Disk (CD) </b><br/>
  155. <img src="http://img.dell.com/images/global/brand/ui/secondary.gif" width="4" height="17"> <a onclick="go('5684');" style="cursor:hand" onmouseover="writeImage('imageDiv','ContDiv', msg3, img3, ttleMsg3)">CD-ROM (internal &amp; external)</a><br/>
  156. <img src="http://img.dell.com/images/global/brand/ui/secondary.gif" width="4" height="17"> <a onclick="go('5686');" style="cursor:hand" onmouseover="writeImage('imageDiv','ContDiv', msg4, img4, ttleMsg4)">Internal CD-RW</a><br/>
  157. <img src="http://img.dell.com/images/global/brand/ui/secondary.gif" width="4" height="17"> <a onclick="go('5687');" style="cursor:hand" onmouseover="writeImage('imageDiv','ContDiv', msg5, img5, ttleMsg5)">External CD-RW</a><br/>
  158.  
  159. <br/><b>Digital Video Disc (DVD)</b><br/>
  160.  
  161. <img src="http://img.dell.com/images/global/brand/ui/secondary.gif" width="4" height="17"> <a onclick="go('5721');" style="cursor:hand" onmouseover="writeImage('imageDiv','ContDiv', msg6, img6, ttleMsg6)">DVD-ROM (internal &amp; external)</a><br/>
  162. <img src="http://img.dell.com/images/global/brand/ui/secondary.gif" width="4" height="17"> <a onclick="go('6206');" style="cursor:hand" onmouseover="writeImage('imageDiv','ContDiv', msg7, img7, ttleMsg7)">Internal DVD-RW</a><br/>
  163. <img src="http://img.dell.com/images/global/brand/ui/secondary.gif" width="4" height="17"> <a onclick="go('6207');" style="cursor:hand" onmouseover="writeImage('imageDiv','ContDiv', msg8, img8, ttleMsg8)">External DVD-RW</a><br/>
  164. <br/><b>External Storage</b><br/>
  165. <img  src="http://img.dell.com/images/global/brand/ui/secondary.gif" width="4" height="17"> <a onmouseover="writeImage('imageDiv','ContDiv', msg1, img1, ttleMsg1)" style="CURSOR: hand" onclick="go('5708');">Pocket Drives</a><br/>
  166. <img  src="http://img.dell.com/images/global/brand/ui/secondary.gif" width="4" height="17"> <a onmouseover="writeImage('imageDiv','ContDiv', msg1, img1, ttleMsg1)" style="CURSOR: hand" onclick="go('5722');">Portable Drives (2.5")</a><br/>
  167.  
  168.  
  169. <br/><br/><br/>
  170. </font>
  171. <div id="imageDiv">
  172. </div>
  173. <div id="ContDiv">
  174. </div>
  175.  
  176.  
  177. </body>
  178. </html>
  179.  
  180. ]]>
  181.  
  182.  
Sep 20 '06 #1
1 2017
acoder
16,027 Expert Mod 8TB
Unless you work for Dell, ask them to fix it.

The code is messy and the div appears in the wrong place. The correct CSS setting for cursor is "pointer", not "hand".
May 17 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: VictorG | last post by:
Hello, I am new to JS and am trying to add some HTML into a JS function. So that when called the script as well as the HTML will be invoked. Is there some type of embed mechanism, sort of the...
136
by: Matt Kruse | last post by:
http://www.JavascriptToolbox.com/bestpractices/ I started writing this up as a guide for some people who were looking for general tips on how to do things the 'right way' with Javascript. Their...
1
by: Muhammad Abdullah | last post by:
Hi am having some problems with the javascript confirm. i have it working fine on one page and it doesnt even pop up at the other. The code on the working page is, private void...
1
by: den2005 | last post by:
Hi everybody, I am confused and still looking why this codes is not working. Can anyone notice or know why this code is not working? Thanks in advance. Code working: <form id="form1"...
11
by: Nathan Sokalski | last post by:
I add several JavaScript events (onchange, onkeypress, etc.) to Controls using the Add method of the Attributes collection. However, if the JavaScript code contains certain characters, such as & or...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.