Browser Compatibility Problem | Member | | Join Date: Aug 2008
Posts: 40
| |
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 :)
|  | Moderator | | Join Date: Jun 2007 Location: York, England, with wolves.
Posts: 4,940
| | | 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
| | | re: Browser Compatibility Problem
Sorry and Thanks.working fine..
|  | Site Moderator | | Join Date: Nov 2006 Location: UK
Posts: 14,581
| | | 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.
|  | Moderator | | Join Date: Jun 2007 Location: York, England, with wolves.
Posts: 4,940
| | | re: Browser Compatibility Problem
By the way, be sure to validate your HTML & CSS - this will often show you what is causing your errors.
|  | Member | | Join Date: Jul 2009 Location: Israel
Posts: 85
| | | re: Browser Compatibility Problem Quote:
Originally Posted by acoder 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...? ;)
|  | Moderator | | Join Date: May 2007 Location: Munich, Germany
Posts: 4,134
| | | 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
|  | Site Moderator | | Join Date: Nov 2006 Location: UK
Posts: 14,581
| | | re: Browser Compatibility Problem
Perhaps I should clarify what I mean by old: IE2 and Netscape 1. Yes, that old.
|  | Member | | Join Date: Jul 2009 Location: Israel
Posts: 85
| | | re: Browser Compatibility Problem Quote:
Originally Posted by acoder 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... ;)
|  | Moderator | | Join Date: May 2007 Location: Munich, Germany
Posts: 4,134
| | | 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
|  | Site Moderator | | Join Date: Nov 2006 Location: UK
Posts: 14,581
| | | 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.
|  | Similar JavaScript / Ajax / DHTML bytes | | | /bytes/about
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 226,439 network members.
|