A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: [RESOLVED] Javascript Not Working In Chrome...

  1. #1
    Member
    Join Date
    Dec 2007
    Posts
    71

    resolved [RESOLVED] Javascript Not Working In Chrome...

    I have a webpage that enlarges images with the use of a snippet of Javascript in the <head> tag. It works fine in IE and FF (you can see an example of how it's supposed to work by clickin on any of the thumbnails on the right side at http://www.mediamonitors.com/QualitativeResearch.asp)

    The snippet is:

    Code:
    <script>
           function reSize(img, s, b){
    	img.width = (s == img.width) ? b : s;
    }
    </script>
    Can someone help me understand why this only works in IE & FF but not in Chrome? I just found out that Google Chrome uses a different rendering engine than Internet Explorer, but not sure what that means in terms of fixing the problem.

    Help greatly appreciated.

  2. #2
    Senior Member
    Join Date
    Apr 2002
    Posts
    2,849
    It doesn't seem to work in version of Firefox (4). Looks like it will work if you remove the <a> tags surrounding the images.

  3. #3
    Member
    Join Date
    Dec 2007
    Posts
    71
    Thank you so much, it worked like a charm.

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center