Connecting Tech Pros Worldwide Forums | Help | Site Map

Browser Compatibility Problem

Member
 
Join Date: Aug 2008
Posts: 40
#1: Jul 15 '09
I am developing a site using PHP and Mysql and facing the following problem.kindly have a look at the following link:

http://mssportfolio.com/dress/dressdetails.php?id=3

This particular link works fine in Firefox but displaying nothing in IE.The problem is with the written javascript.The javascript is to maximize the image by clicking on that image and to move to the next image by clicking the "Next" button.if i comment that script,the contents without javascript are working fine.How to rectify this issue?

Thnx in advance :)

Markus's Avatar
Moderator
 
Join Date: Jun 2007
Location: York, England, with wolves.
Posts: 4,940
#2: Jul 15 '09

re: Browser Compatibility Problem


If you *know* the problem is the javascript, why would you post it over in PHP? I've moved it for you.

The problem appears to be that you have neglected to close your HTML comment in the second <script /> tag.
Member
 
Join Date: Aug 2008
Posts: 40
#3: Jul 16 '09

re: Browser Compatibility Problem


Sorry and Thanks.working fine..
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#4: Jul 16 '09

re: Browser Compatibility Problem


Unless you want to support really old browsers, you can omit the HTML comments now. You don't need to hide JavaScript from modern browsers. Better still, keep your JavaScript code in a separate file.
Markus's Avatar
Moderator
 
Join Date: Jun 2007
Location: York, England, with wolves.
Posts: 4,940
#5: Jul 16 '09

re: Browser Compatibility Problem


By the way, be sure to validate your HTML & CSS - this will often show you what is causing your errors.
Canabeez's Avatar
Member
 
Join Date: Jul 2009
Location: Israel
Posts: 85
#6: Jul 22 '09

re: Browser Compatibility Problem


Quote:

Originally Posted by acoder View Post

Unless you want to support really old browsers, you can omit the HTML comments now. You don't need to hide JavaScript from modern browsers. Better still, keep your JavaScript code in a separate file.

They still exist, I mean the old browsers...? ;)
gits's Avatar
Moderator
 
Join Date: May 2007
Location: Munich, Germany
Posts: 4,134
#7: Jul 23 '09

re: Browser Compatibility Problem


of course ... they do ... but would that be essential? for simpler (and therefor faster) code it is much better to ignore it except you have an app that must! run in all users browsers and to achieve that it could be a never ending story ... because you wouldn't just need to take the JavaScript into account even css and html, doctypes etc.

so it is a good advice to ignore such old browsers in case you don't really need to support them.

kind regards
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#8: Jul 23 '09

re: Browser Compatibility Problem


Perhaps I should clarify what I mean by old: IE2 and Netscape 1. Yes, that old.
Canabeez's Avatar
Member
 
Join Date: Jul 2009
Location: Israel
Posts: 85
#9: Jul 23 '09

re: Browser Compatibility Problem


Quote:

Originally Posted by acoder View Post

Perhaps I should clarify what I mean by old: IE2 and Netscape 1. Yes, that old.

Maybe I'm wrong, but I don't think anything under IE6 or Firefox2 should be taken into consideration when building an app today... ;)
gits's Avatar
Moderator
 
Join Date: May 2007
Location: Munich, Germany
Posts: 4,134
#10: Jul 23 '09

re: Browser Compatibility Problem


of course :) ... and now i understand that you asked a question that i just misunderstood as rhetorical question for pro to support old browsers in a way as it was done above ... of course we could and probably should ignore such old browsers :)

kind regards
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#11: Jul 23 '09

re: Browser Compatibility Problem


Oh right, I too misunderstood your post :) Maybe I should've realised from the smiley. I doubt if anyone actually uses those browsers any more. In fact, Netscape's probably close to going completely off the radar because it's no longer supported.
Reply