6 Replies Latest reply on Oct 12, 2013 10:40 PM by DreamChaser

    Rollover Java Script Problem

    DreamChaser Level 1

      I just upgaded to a new Windows 8 system and also upgraded from old Macromedia Dreamweaver 8 to CS6.

       

      On my old system, when I inserted an image object / rollover image, the code that was written inserted BORDER="0".

       

      That made it so when viewed in a browser, the image was not bordered with hyperlink blue/purple.

       

      My new system does not put the Border="0" in the code and thus I get a border of the rollover image in hyperlink colors.

       

      I've tried changing the CSS for links, etc. and it does not have any effect on rollovers.

       

      How do I get the java script writer to add that after the image size in the source code the dialog box creates???

       

      Your help is much appreciated!

        • 1. Re: Rollover Java Script Problem
          DreamChaser Level 1

          To clarify my question, I don't want to go into the behaviors and add the border="0" attribute manually each time I insert a rollover, I want to have it done by default when I use the menu to insert a rollover.

          • 2. Re: Rollover Java Script Problem
            BenPleysier Adobe Community Professional & MVP

            Old solution

            <A HREF="jak58.html"><IMG SRC="pic1.gif" ALT="My picture." BORDER="0"></A>

            New solution, place the following into your style sheet

            a img  { 

            border: none; 

            }

            • 3. Re: Rollover Java Script Problem
              John Waller Adobe Community Professional & MVP

              I've tried changing the CSS for links, etc. and it does not have any effect on rollovers.

              Got a link to any examples so we can see what's wrong with the code? Should work OK.

              • 4. Re: Rollover Java Script Problem
                DreamChaser Level 1

                Thanks Ben,

                 

                 

                 

                Thanks for your help with the ‘LISTINGS’ page on my website (link below).

                 

                 

                 

                Setting up CCS for no border for tag “a img” (link images) got the effect I need without changing the other image types on the page that have their own formatting.

                 

                 

                 

                However, years ago, using a 6 inch thick dreamweaver book, I was able somehow to save a variable BORDER=”0” in some way that changed the Java Script to automatically insert that when using the top menu, to insert image object / rollover image. Do know of a way to change the behavior attribute for rollover (image swap / image restore)???

                 

                 

                 

                I know there’s a way. Do you know how to do it?

                 

                 

                 

                 

                 

                GORDON HUNT

                 

                REALTOR

                 

                CHAPMAN RICHARDS & ASSOC.

                 

                801-486-7075

                 

                 

                 

                <http://www.gordonhuntrealestate.com/> GordonHuntRealEstate.com

                 

                 

                 

                P.S. The Finest Compliment I Can Receive Is Your Referral!

                • 5. Re: Rollover Java Script Problem
                  BenPleysier Adobe Community Professional & MVP

                  Hi Gordon,

                   

                  1. An image has no border by default, that is unless the image is inside an <a> element.
                  2. The border attribute of <img> is depricated in HTML 4.01 and as such the <img> border attribute is not supported in HTML5.

                   

                  Using the above named facts, we must use CSS instead.

                   

                  To answer your question, even if I did have a way to what you are suggesting, I would not part with that knowledge knowing that you would be creating an invalid document.

                   

                  I always start my style sheets with a CSS-reset/normalize section that includes

                  img {

                      border: 0;

                  }


                  1 person found this helpful
                  • 6. Re: Rollover Java Script Problem
                    DreamChaser Level 1

                    Thanks Ben,

                     

                     

                     

                    I’m not a web developer. I’m a ruthless Realtor with a previous background in IT Wan Network and Vertical Market $1M+ system software sales. I bought dreamweaver and a book a few years back, developed a pretty cool table based website and kick butt making money in real estate. It adds credibility to my business and I get to maintain the site with minimal effort to update homes for sale, statistics, etc. Not too deep into web stuff. However, your solution solved the problem and I’m glad it is the better standard in compliance, versus old code.

                     

                     

                     

                    Take a look at my website link below. It has a few issues where some may have to run it in compatibility mode, and may not render correctly on newer browsers. Let me know if you have any suggestions. I strive to be one of the best without having to sub out web development and be a clone like my competitors.

                     

                     

                     

                    Thanks again for your help

                     

                     

                     

                    GORDON HUNT

                     

                    REALTOR

                     

                    CHAPMAN RICHARDS & ASSOC.

                     

                    801-486-7075

                     

                     

                     

                    <http://www.gordonhuntrealestate.com/> GordonHuntRealEstate.com

                     

                     

                     

                    P.S. The Finest Compliment I Can Receive Is Your Referral!