Pop up alert

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • strobie
    New Member
    • Oct 2008
    • 7

    Pop up alert

    Hi, does anyone know how to make a alert pop up open for only certain browsers, using javascript...sp ecifically IE 7 or older
  • zaphod42
    New Member
    • Oct 2008
    • 55

    #2
    I usually just do :

    Code:
    if(document.all){alert('your alert text here')}
    but it depends on what browser specifically... .if you just need it for ie in general, the above will work

    Comment

    • acoder
      Recognized Expert MVP
      • Nov 2006
      • 16032

      #3
      IE is not the only browser which supports document.all.

      OP: why do you need an alert for a specific browser? Perhaps if you explain your problem, we could suggest an alternative.

      Comment

      • strobie
        New Member
        • Oct 2008
        • 7

        #4
        I designed a site and went overboard with transparent div tags, at the time I wasn't aware of IE (pre 7) limitations

        here's the link
        http://www.friendsofin stapstudycenter .net/INSTAP-NEW/

        Comment

        • acoder
          Recognized Expert MVP
          • Nov 2006
          • 16032

          #5
          Instead of an alert, add a filter for IE to allow it to display transparent PNG images.

          Comment

          • strobie
            New Member
            • Oct 2008
            • 7

            #6
            hmm gave the ie filter a shot. i noticed a slight size change with some images but wouldn't work for me.

            Comment

            • acoder
              Recognized Expert MVP
              • Nov 2006
              • 16032

              #7
              Try using the IE7 library to bring IE5-6 up to date.

              Comment

              • strobie
                New Member
                • Oct 2008
                • 7

                #8
                awesome it worked! one problem though. it works only when I have actual images living in a file,

                eg.http://www.friendsofin stapstudycenter .net/INSTAP-NEW/TEST.html

                but what do I do if the images are being called from div tags in my css stylsheet?

                Comment

                • acoder
                  Recognized Expert MVP
                  • Nov 2006
                  • 16032

                  #9
                  Could you give an example?

                  Comment

                  • zaphod42
                    New Member
                    • Oct 2008
                    • 55

                    #10
                    acoder....I'm just curious, I've only been developing js for about year, and I've tested my systems on ie 5-7 ff 2&3, and the newest safari....of those only the ie versions support document.all... .what other browsers do?


                    ANSWER:::

                    after I posted this I went and looked around a bit like I should have done BEFORE I asked;)

                    Explorer 4+, Opera 6+, iCab, Ice, Omniweb 4.2-

                    ALL support document.all

                    Comment

                    • strobie
                      New Member
                      • Oct 2008
                      • 7

                      #11
                      acoder, you have been a great help. I renamed all my images to implement the IE -7 filter. Works great! My only question is, is it common for links to lose functionality if the are in a div that embeds transparent images that have been corrected by the applied java script filter, or did I do something incorrectly?

                      regards

                      Comment

                      • acoder
                        Recognized Expert MVP
                        • Nov 2006
                        • 16032

                        #12
                        That shouldn't happen. Does this affect all browsers or only IE6?

                        Comment

                        • strobie
                          New Member
                          • Oct 2008
                          • 7

                          #13
                          just 6.0, and 5.0 also

                          Comment

                          • acoder
                            Recognized Expert MVP
                            • Nov 2006
                            • 16032

                            #14
                            Is the page where you've made the changes the one you linked to earlier?

                            Comment

                            • strobie
                              New Member
                              • Oct 2008
                              • 7

                              #15
                              didn't want to overwrite the old so i had to change to

                              on the above url, my 'new book' hovers/links at the bottom are disabled

                              and here:

                              my side navigation is disabled... confusing

                              Comment

                              Working...