Client Side Things
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesClient Side Things

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 Codewalkers Forums Sponsor:
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
  #1  
Old November 15th, 2004, 02:07 PM
doriangriffiths doriangriffiths is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Edinburgh, UK
Posts: 4 doriangriffiths User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Buttons

Hello all,

I have been trying to get a submit button to work as an image with a rollover with some javascript doing some of the work. I have two ways of doing this. One is using a proper button with a graphic but the rollover does not work but the script does and is this:

<input name="searchbutton" type="image" src="images/button-search-up.gif" value="Search" onclick="javascript:parent.passTextIE(this.form.criteria.va lue);" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('searchbutton','','images/button-search-down.gif',1)">

The other way is using a a href link where the rollover works but the javascript does not work. This is shown here:

<a href="javascript::parent.passTextIE(this.form.criteria.v alue);" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('name1','','images/button-search-down.gif',1)"><img src="images/button-search-up.gif" name="name1" width="106" height="40" border="0"></a>

The javascript being executed copies info to a iframe and submits a form on there. Here is the javascript:

top.frames['searchList'].document.frmsubmit.searchcriteria.value = str;
document.searchList.frmsubmit.submit();

Anybody know how I can get this script to work but with a rollover image. Hope this make sense!

Cheers

Dorian

Reply With Quote
  #2  
Old November 16th, 2004, 04:25 AM
rehfeld_dot_us rehfeld_dot_us is offline
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Posts: 825 rehfeld_dot_us User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: Buttons

use css

Code:

<style type="text/css">
.button       { background: url(images/normal.gif) no-repeat; }
.button:hover { background: url(images/hover.gif) no-repeat; }
</style>

<a class="button">i am a button</a>


Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesClient Side Things > Buttons


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