CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old April 2nd, 2004, 07:48 AM
RadioactiveFrog's Avatar
RadioactiveFrog RadioactiveFrog is offline
sleeping guru
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Feb 2003
Location: under the stars
Posts: 2,444 RadioactiveFrog User rank is First Lieutenant (10000 - 20000 Reputation Level)RadioactiveFrog User rank is First Lieutenant (10000 - 20000 Reputation Level)RadioactiveFrog User rank is First Lieutenant (10000 - 20000 Reputation Level)RadioactiveFrog User rank is First Lieutenant (10000 - 20000 Reputation Level)RadioactiveFrog User rank is First Lieutenant (10000 - 20000 Reputation Level)RadioactiveFrog User rank is First Lieutenant (10000 - 20000 Reputation Level)RadioactiveFrog User rank is First Lieutenant (10000 - 20000 Reputation Level)RadioactiveFrog User rank is First Lieutenant (10000 - 20000 Reputation Level)  Folding Points: 157641 Folding Title: Super Ultimate Folder - Level 1Folding Points: 157641 Folding Title: Super Ultimate Folder - Level 1Folding Points: 157641 Folding Title: Super Ultimate Folder - Level 1Folding Points: 157641 Folding Title: Super Ultimate Folder - Level 1Folding Points: 157641 Folding Title: Super Ultimate Folder - Level 1Folding Points: 157641 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 6 Days 6 h 18 m 28 sec
Reputation Power: 171
Send a message via MSN to RadioactiveFrog
hover buttons and CSS not working

i am having trouble with a hover button.
it works fine in just an HTML page but when i put it on a CSS & php page nothing happens when i hover over it can anyone advise me on how to resolve this please.....thank you

here is the code i am using for the button....

Code:
<a href="productinfo.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Add Button','','images/buttons/infoover.jpg',1)"><img src="images/buttons/info.jpg" name="Add Button" width="32" height="31" border="0"></a>


Thanks in advanced to any replies

RF

Reply With Quote
  #2  
Old April 2nd, 2004, 08:18 AM
Buraque Buraque is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Location: Shimonoseki / JAPAN
Posts: 58 Buraque User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 m 4 sec
Reputation Power: 6
If you are copying only that piece of code you've posted, it won't work. it calls 2 javascript functions.

search for the javascript code with MM_swapImgRestore and MM_swapImage functions. and copy it too.
hope this helps

regards
__________________
Sweet smell of a great sorrow lies over the land. Plumes of smoke rise, merge into the leaden sky. A man lies and dreams of green fields and rivers, but awakes to a morning with no reason for waking. He's haunted by the memory of lost paradise. In his youth or dream, he can't be precise. He's chained forever to a world that's departed. It's not enough, it's not enough.
Gilmour

Reply With Quote
  #3  
Old April 2nd, 2004, 08:38 AM
RadioactiveFrog's Avatar
RadioactiveFrog RadioactiveFrog is offline
sleeping guru
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Feb 2003
Location: under the stars
Posts: 2,444 RadioactiveFrog User rank is First Lieutenant (10000 - 20000 Reputation Level)RadioactiveFrog User rank is First Lieutenant (10000 - 20000 Reputation Level)RadioactiveFrog User rank is First Lieutenant (10000 - 20000 Reputation Level)RadioactiveFrog User rank is First Lieutenant (10000 - 20000 Reputation Level)RadioactiveFrog User rank is First Lieutenant (10000 - 20000 Reputation Level)RadioactiveFrog User rank is First Lieutenant (10000 - 20000 Reputation Level)RadioactiveFrog User rank is First Lieutenant (10000 - 20000 Reputation Level)RadioactiveFrog User rank is First Lieutenant (10000 - 20000 Reputation Level)  Folding Points: 157641 Folding Title: Super Ultimate Folder - Level 1Folding Points: 157641 Folding Title: Super Ultimate Folder - Level 1Folding Points: 157641 Folding Title: Super Ultimate Folder - Level 1Folding Points: 157641 Folding Title: Super Ultimate Folder - Level 1Folding Points: 157641 Folding Title: Super Ultimate Folder - Level 1Folding Points: 157641 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 6 Days 6 h 18 m 28 sec
Reputation Power: 171
Send a message via MSN to RadioactiveFrog
rite, ok thanks for that reply but i have now also copied in the files and have had no luck...ive also added the onLoad bit to the body.....

but the hover feature still dont work

any other suggestions..

Thanks

RF

Reply With Quote
  #4  
Old April 2nd, 2004, 09:31 AM
Buraque Buraque is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Location: Shimonoseki / JAPAN
Posts: 58 Buraque User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 m 4 sec
Reputation Power: 6
Did you copied all of these?

Code:
<SCRIPT LANGUAGE="JavaScript" TYPE="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</SCRIPT>


When you create a rollover image with Dreamweaver, it puts this javascript code automaticly right after the <TITLE> tag...

Reply With Quote
  #5  
Old April 3rd, 2004, 08:42 AM
RadioactiveFrog's Avatar
RadioactiveFrog RadioactiveFrog is offline
sleeping guru
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Feb 2003
Location: under the stars
Posts: 2,444 RadioactiveFrog User rank is First Lieutenant (10000 - 20000 Reputation Level)RadioactiveFrog User rank is First Lieutenant (10000 - 20000 Reputation Level)RadioactiveFrog User rank is First Lieutenant (10000 - 20000 Reputation Level)RadioactiveFrog User rank is First Lieutenant (10000 - 20000 Reputation Level)RadioactiveFrog User rank is First Lieutenant (10000 - 20000 Reputation Level)RadioactiveFrog User rank is First Lieutenant (10000 - 20000 Reputation Level)RadioactiveFrog User rank is First Lieutenant (10000 - 20000 Reputation Level)RadioactiveFrog User rank is First Lieutenant (10000 - 20000 Reputation Level)  Folding Points: 157641 Folding Title: Super Ultimate Folder - Level 1Folding Points: 157641 Folding Title: Super Ultimate Folder - Level 1Folding Points: 157641 Folding Title: Super Ultimate Folder - Level 1Folding Points: 157641 Folding Title: Super Ultimate Folder - Level 1Folding Points: 157641 Folding Title: Super Ultimate Folder - Level 1Folding Points: 157641 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 6 Days 6 h 18 m 28 sec
Reputation Power: 171
Send a message via MSN to RadioactiveFrog
yes i did

Reply With Quote
  #6  
Old April 3rd, 2004, 09:36 AM
RadioactiveFrog's Avatar
RadioactiveFrog RadioactiveFrog is offline
sleeping guru
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Feb 2003
Location: under the stars
Posts: 2,444 RadioactiveFrog User rank is First Lieutenant (10000 - 20000 Reputation Level)RadioactiveFrog User rank is First Lieutenant (10000 - 20000 Reputation Level)RadioactiveFrog User rank is First Lieutenant (10000 - 20000 Reputation Level)RadioactiveFrog User rank is First Lieutenant (10000 - 20000 Reputation Level)RadioactiveFrog User rank is First Lieutenant (10000 - 20000 Reputation Level)RadioactiveFrog User rank is First Lieutenant (10000 - 20000 Reputation Level)RadioactiveFrog User rank is First Lieutenant (10000 - 20000 Reputation Level)RadioactiveFrog User rank is First Lieutenant (10000 - 20000 Reputation Level)  Folding Points: 157641 Folding Title: Super Ultimate Folder - Level 1Folding Points: 157641 Folding Title: Super Ultimate Folder - Level 1Folding Points: 157641 Folding Title: Super Ultimate Folder - Level 1Folding Points: 157641 Folding Title: Super Ultimate Folder - Level 1Folding Points: 157641 Folding Title: Super Ultimate Folder - Level 1Folding Points: 157641 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 6 Days 6 h 18 m 28 sec
Reputation Power: 171
Send a message via MSN to RadioactiveFrog
ok here is what i have on the page (that is relevant)

Code:
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</head>
<body onLoad="MM_preloadImages('images/buttons/infoover.jpg')">
...


and then for the button in a php echo statement

Code:
<a href=\"productinfo.php?prod_id=$row[5]\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('InfoButton','','images/buttons/infoover.jpg',1)\"><img src=\"images/buttons/info.jpg\" name=\"InfoButton\" width=\"32\" height=\"31\" border=\"0\"></a>


is that ok?

thanks for your assistence

RF

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > hover buttons and CSS not working


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway