Announcement

Collapse
No announcement yet.

Onmouseover not working when page uploaded

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Onmouseover not working when page uploaded

    Hi Folks,

    Here is an example of code I'm using that employs "Onmouseover" to display a copyright message when hovering the mouse over an image.

    <a onmouseover="window.status='Copyright Magical Wonders';return true;" onmouseout="window.status='';return true;" href="../cgi-bin/ca000001.pl?ACTION=SHOWCART"><img src="basket.jpg" border="0" height="64" width="119" alt="View Basket"></a>
    This is hard coded into the Act_primary templates that controls my page layout.

    This works great when viewed locally on my machine, but fails miserably when uploaded to my server. The online result can be seen here: http://www.magicalwonders.com/acatalog/Exclusives.html

    I've left the code uncompacted and borders on during design of layout and function.

    I'm wondering if this is something to do with the server being linux? My machine is using Windows XP Pro SP2. This is the only difference I can think of.

    I've uploaded a test page using all lower case for the View Basket image, but that doesn't make any difference: http://www.magicalwonders.com/mouse/mouseover.htm I've only included the one image for test purposes.

    So I'm guessing it is a linux issue, but don't know if it is fixable?

    Can anyone point me in the right direction?

    Many thanks,

    Myles
    www.magicalwonders.com

    #2
    HTML Code:
    <a href="../cgi-bin/ca000001.pl?ACTION=SHOWCART" onmouseout="window.status='Copyright Magical Wonders';return true;" onmouseover="window.status='Copyright Magical Wonders';return true;">
    <img width="119" height="64" border="0" alt="View Basket" src="basket.jpg"/>
    is online, and thats not the same as what you typed here.

    furthermore, javascript is executed client side, and has nothing to do with the server.

    Comment


      #3
      that's very pretty, Gabe
      Tracey

      Comment


        #4
        also, internet exploder and firefox deal with this differently.

        read:
        http://blog.taragana.com/index.php/a...us-in-firefox/

        Comment


          #5
          Originally posted by budgetbumps
          that's very pretty, Gabe
          um, thanks? lol.

          Comment


            #6
            my best advice would be to simply not use the status bar, its both useless and annoying.

            Comment


              #7
              <a href="../cgi-bin/ca000001.pl?ACTION=SHOWCART" onmouseout="window.status='Copyright Magical Wonders';return true;" onmouseover="window.status='Copyright Magical Wonders';return true;">
              <img width="119" height="64" border="0" alt="View Basket" src="basket.jpg"/>

              is online, and thats not the same as what you typed here.
              I may have copied the wrong code here, as I have so many test pages on the go for this.

              However, the fact remains that this code:
              <a onmouseover="window.status='copyright magical wonders';return true;" onmouseout="window.status='';return true;" href="../cgi-bin/ca000001.pl?action=showcart"><img src="./images/basket.jpg" border="0" height="64" width="119" alt="view basket"></a>
              Works fine when viewed on my machine, but not when viewed online at
              http://www.magicalwonders.com/mouse/mouseover.htm

              So my problem remains as to why this is happening?

              Myles
              www.magicalwonders.com

              Comment


                #8
                I believe the window.status function is disabled on modern browsers to help prevent phishing attacks.

                You're probably using an old browser to preview.

                Mike
                -----------------------------------------

                First Tackle - Fly Fishing and Game Angling

                -----------------------------------------

                Comment


                  #9
                  Thanks for the link Gabe,

                  I've only just spotted that particular post. The link though seems to refer to "How to enable windows.status in Firefox? I can't see any info regarding what is causing my problem.



                  my best advice would be to simply not use the status bar, its both useless and annoying.
                  It does have the benefit of hiding ugly link references, plus it can remind people that the graphics are copyrighted. So not useless imho. Not sure why you would think they are annoying?

                  Best wishes,

                  Myles
                  www.magicalwonders.com

                  Comment


                    #10
                    You're probably using an old browser to preview.
                    Hello Mike,

                    I'm using IE7 for both offline previews and online viewing. Is it possible to have different settings for pages coming from a remote location? Maybe that's what's happening?

                    Myles
                    www.magicalwonders.com

                    Comment


                      #11
                      When you move over normal A tags the status bar shows where you would go if you clicked it (imagine a default mouseover function). I can see why browsers would disable any attempt to alter that information.
                      Norman - www.drillpine.biz
                      Edinburgh, U K / Bitez, Turkey

                      Comment


                        #12
                        its annoying if people fiddle in my status bar, becasue its 'my' status bar.

                        its not part of the browser rendered content, and so it should have never been editable in the first place. Microsoft have added some crappy stuff inot the javascript and html spec, upwards and including the marquee tag and the status changing code, that annoys me so much.

                        and ugly links? if you need to hide the link location, then perhaps they should have never been ugly in the first palce?



                        now, as for your code, you should get yourself a copy of multiple internet explorers.
                        http://tredosoft.com/Multiple_IE

                        and test the code in all browsers. offline and online,and see what behaviours you get. i also siggest you try firefox, since it tends to show people the link no matter how ugly they are.

                        try making yourself a selection of buttons, and images, and links with onmouseover and onmouseouts and see if they behave differently with these browsers. Some of them may not pick up the code.

                        Comment


                          #13
                          its annoying if people fiddle in my status bar, becasue its 'my' status bar.
                          So what do you do with it? If you really want to see the link locations, then fair enough.

                          and ugly links? if you need to hide the link location, then perhaps they should have never been ugly in the first palce?
                          I agree, but some things are out of my control. For example, how's this for a nasty looking link...
                          http://www.magicalwonders.com/cgi-bi...ction=showcart

                          Not much I can do about that....except try and hide it!

                          now, as for your code, you should get yourself a copy of multiple internet explorers.
                          http://tredosoft.com/Multiple_IE
                          Again, thanks for the link. I'm doing my best to ensure that all my non Actinic pages validate against the doctype for those pages. That should ensure they will display properly across all browsers. (I still take a look though!)

                          Best wishes,

                          Myles
                          www.magicalwonders.com

                          Comment


                            #14
                            Ok. In IE7 window.status is disabled for zones in the Internet and restricted zones. It will work locally, hence the behaviour you see.

                            here's the official word from Microsoft in IE7 release notes:

                            Status Bar Scripting--Scripts will no longer be able to set the status bar text through the window.status and window.defaultStatus methods by default in the Internet and Restricted Zones. This helps prevent attackers from leveraging those methods to spoof the status bar. To revert to previous behavior and allow scripts to set the status bar through window.status and window.defaultStatus, follow these steps:

                            Open Internet Explorer, click the Tools button, click Internet Options, and then click the Security tab.
                            Click Internet or Restricted sites, and then click the Custom level button.
                            Scroll down to Allow status bar updates via script, select Enable.
                            Click OK until you return to Internet Explorer.
                            Mike
                            -----------------------------------------

                            First Tackle - Fly Fishing and Game Angling

                            -----------------------------------------

                            Comment


                              #15
                              Originally posted by gabrielcrowe
                              it tends to show people the link no matter how ugly they are.
                              the people? or the links?
                              Tracey

                              Comment

                              Working...
                              X