Script works in IE 6, but not Firefox

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sachinmanath
    New Member
    • Sep 2008
    • 1

    Script works in IE 6, but not Firefox

    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.



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

    Code:
    <SCRIPT Language="JScript">
    function fxSearch1(pic,wid,heig){
    	var it;
    	var pic;
    	var wid;
    	var heig;	
       it = "<img src='../fileup/"+pic+"' width='"+wid+"' height='"+heig+"' border='0'>";
       rateimgs1.innerHTML = it;
    	}
    
    </script>
    and this code in .aspx.vb file


    Code:
    html = "<img src=" & IMAGE_DIRECTORY & System.IO.Path.GetFileName(s) & " height=" & imgHeight & " width=" & imgWidth & " onclick=""fxSearch1('" & System.IO.Path.GetFileName(s) & "','" & bigimgWidth & "','" & bigimgHeight & "')"" / > "
    
    pics.Add(html)
    can you help me out.
    Thanks.
    Last edited by acoder; Sep 23 '08, 11:39 AM. Reason: Added [code] tags
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    The script tag should have a type attribute set, not the language one (which is deprecated) :
    Code:
    <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.

    Comment

    Working...