SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jan 2003
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Multiple rollovers help...

    OK, I finally got A rollover to work but now I'm having trouble with multiple ones. The first one works fine, but none of the others do, just says that there is an error on the page. Please help as I'm about to go bold from ripping my hair out... I mean everything looks good to me. But I don't know much so here.


    Here is the <head></head> part:




    Code:
    <SCRIPT LANGUAGE="JAVASCRIPT" TYPE="TEXT/JAVASCRIPT">
    	<!-- Hide script from old browsers
    
    	if (document.images) {
    		links1Home1 = new Image
    		links1Home = new Image
    		
                    links2Forums1 = new Image
                    links2Forums = new Image
                    
                    links3Rarticles = new Image
                    links3Articles = new Image
    
                    links4Faqs1 = new Image
    		links4Faqs = new Image
    
    
    links1Home1.src = "http://www.geocities.com/dr_montagues_research/links/1home.jpg"
    links1Home.src = "http://www.geocities.com/dr_montagues_research/links/home.gif"
    links2Forums1.src = "http://www.geocities.com/dr_montagues_research/links/1forum.jpg"
    links2Forums.src = "http://www.geocities.com/dr_montagues_research/links/forum.gif"
    links3Rarticles.src = "http://www.geocities.com/dr_montagues_research/links/rarticles.jpg"
    linksArticles.src = "http://www.geocities.com/dr_montagues_research/links/over.gif"
    links4Faqs1.src = "http://www.geocities.com/dr_montagues_research/links/1faqs.jpg"
    links4Faqs.src = "http://www.geocities.com/dr_montagues_research/links/faqs.gif"	}
         
    else {
    
    	links1Home1 = ""
    		links1Home = ""
    
    		linksForums1 = ""
    		linksForums = ""
    
    		linkRasrticles = ""
    		linksArticles = ""
    
                    linksFaqs1 = ""
    		linksFaqs = ""
    		
                    document.links1 = ""
    
                    document.links2 = ""
    
                    document.links3 = ""
    
                    document.links4 = ""
    	}
    
    	// End hiding script from old browsers -->
    	</SCRIPT>


    Then my links... sorry that it expends the page...



    Code:
    <A HREF="next.html" onMouseover="document.links1.src=links1Home1.src" onMouseout="document.links1.src=links1Home.src"><IMG SRC="links/home.gif" BORDER="0" NAME="links1" ALT="Home"></A>
    <A HREF="http://pso.proboards.com" onMouseover="document.links2.src=linksForums1.src" onMouseout="document.links2.src=linksForum.src"><IMG SRC="links/forum.gif" BORDER="0" NAME="links2" ALT="Forums"></A>
    <A HREF="articles.html" onMouseover="document.links3.src=linksRarticles.src" onMouseout="document.links3.src=linksArticles.src"><IMG SRC="links/over.gif" BORDER="0" NAME="links3" ALT="Articles"></A>
    <A HREF="faqs.html" onMouseover="document.links4.src=linksFaqs1.src" onMouseout="document.links4.src=linksFaqs.src"><IMG SRC="links/faqs.gif" BORDER="0" NAME="links4" ALT="Faqs"></A>


    Thank you

  2. #2
    SitePoint Enthusiast
    Join Date
    Jun 2002
    Posts
    43
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i use
    Code:
    <img src="imgOff.jpg" onMouseOver="this.src='imgOver.jpg';" onMouseOut="this.src='imgOff.jpg';" />
    to do my mouseovers and then a script to preload the over states.

    dunno if that will help you but i find it easier?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •