Browser Compatibility Problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • divyac
    New Member
    • Aug 2008
    • 40

    Browser Compatibility Problem

    I am developing a site using PHP and Mysql and facing the following problem.kindly have a look at the following link:



    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
    Recognized Expert Expert
    • Jun 2007
    • 6092

    #2
    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.

    Comment

    • divyac
      New Member
      • Aug 2008
      • 40

      #3
      Sorry and Thanks.working fine..

      Comment

      • acoder
        Recognized Expert MVP
        • Nov 2006
        • 16032

        #4
        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.

        Comment

        • Markus
          Recognized Expert Expert
          • Jun 2007
          • 6092

          #5
          By the way, be sure to validate your HTML & CSS - this will often show you what is causing your errors.

          Comment

          • Canabeez
            New Member
            • Jul 2009
            • 126

            #6
            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...? ;)

            Comment

            • gits
              Recognized Expert Moderator Expert
              • May 2007
              • 5388

              #7
              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

              Comment

              • acoder
                Recognized Expert MVP
                • Nov 2006
                • 16032

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

                Comment

                • Canabeez
                  New Member
                  • Jul 2009
                  • 126

                  #9
                  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... ;)

                  Comment

                  • gits
                    Recognized Expert Moderator Expert
                    • May 2007
                    • 5388

                    #10
                    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

                    Comment

                    • acoder
                      Recognized Expert MVP
                      • Nov 2006
                      • 16032

                      #11
                      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.

                      Comment

                      Working...