Dreamweaver rollover issue
Posted: 25 November 2007 03:29 PM   [ Ignore ]
Jr. Member
RankRank
Total Posts:  50
Joined  2007-11-10

The rollover buttons javascript doesn’t work on the homepage:
http://www.datetopia.com/

It works fine on other pages:
http://www.datetopia.com/services-dating-matchmaker-software-websites.html

Any ideas why?

<!--
function 
newImage(arg{
    
if (document.images{
        rslt 
= new Image();
        
rslt.src arg;
        return 
rslt;
    
}
}

function changeImages() {
    
if (document.images && (preloadFlag == true)) {
        
for (var i=0i<changeImages.arguments.lengthi+=2{
            document[changeImages
.arguments[i]].src changeImages.arguments[i+1];
        
}
    }
}

var preloadFlag false;
function 
preloadImages() {
    
if (document.images{
        home_over 
newImage("images/home-over.gif");
        
products_over newImage("images/products-over.gif");
        
portfolio_over newImage("images/portfolio-over.gif");
        
services_over newImage("images/services-over.gif");
        
contact_over newImage("images/contact-over.gif");
        
preloadFlag true;
    
}
}

// --> 
Profile
 
 
Posted: 23 January 2008 05:20 PM   [ Ignore ]   [ # 1 ]
Jr. Member
RankRank
Total Posts:  36
Joined  2008-01-11

If you used a list, either unordered or ordered you would not have any problems and could achieve the same effect without JavaScript.

Profile
 
 
Posted: 23 January 2008 06:29 PM   [ Ignore ]   [ # 2 ]
Jr. Member
RankRank
Total Posts:  50
Joined  2007-11-10

Use a list instead of what?

Profile
 
 
Posted: 23 January 2008 07:11 PM   [ Ignore ]   [ # 3 ]
Jr. Member
RankRank
Total Posts:  36
Joined  2008-01-11

You use a list to create your menu instead of using JavaScript.

Example:

HTML

<ul>
 <
li><a href="yourURL">Home</a></li>
 <
li><a href="yourURL">Products</a></li>
 <
li><a href="yourURL">Portfolio</a></li>
 <
li><a href="yourURL">Services</a></li>
 <
li><a href="yourURL">Contact</a></li>
</
ul> <!-- end #main-nav --> 

Styled to your likings.

Read this article from a list apart on taming lists

Profile
 
 
Posted: 16 December 2010 08:29 AM   [ Ignore ]   [ # 4 ]
Jr. Member
RankRank
Total Posts:  42
Joined  2010-12-14

aptana is a better editor then DW.It also css3 and html5

Profile