By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,028 Members | 1,784 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,028 IT Pros & Developers. It's quick & easy.

Script works in IE 6, but not Firefox

P: 1
i have a code which works in internet explorer but not in firefox. I have a page with several thumbnails. Above these thumbnails I placed a large picture. So, when you click a thumb, the large pic changes dynamically to reflect the
thumbnail
See the live example here.

http://www.automart-me.com/eng/autom...ehicle_id=1834

here is my code
im using this function in .aspx file

Expand|Select|Wrap|Line Numbers
  1. <SCRIPT Language="JScript">
  2. function fxSearch1(pic,wid,heig){
  3.     var it;
  4.     var pic;
  5.     var wid;
  6.     var heig;    
  7.    it = "<img src='../fileup/"+pic+"' width='"+wid+"' height='"+heig+"' border='0'>";
  8.    rateimgs1.innerHTML = it;
  9.     }
  10.  
  11. </script>
  12.  
and this code in .aspx.vb file


Expand|Select|Wrap|Line Numbers
  1. html = "<img src=" & IMAGE_DIRECTORY & System.IO.Path.GetFileName(s) & " height=" & imgHeight & " width=" & imgWidth & " onclick=""fxSearch1('" & System.IO.Path.GetFileName(s) & "','" & bigimgWidth & "','" & bigimgHeight & "')"" / > "
  2.  
  3. pics.Add(html)
  4.  
can you help me out.
Thanks.
Sep 23 '08 #1
Share this Question
Share on Google+
1 Reply


acoder
Expert Mod 15k+
P: 16,027
The script tag should have a type attribute set, not the language one (which is deprecated) :
Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript">
The cause of the problem here is that JScript is only supported by IE.

PS. please use code tags when posting code. Thanks.
Sep 23 '08 #2

Post your reply

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