473,395 Members | 1,530 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

forms: img submit button: can u do rollovers??


I have a form in which submit button is an img.. would like to do it
w/a rollover, but can't get rollover to work.. can you do rollovers
w/img submit buttons? this is code I have:

<input type="image" name="log" src="images/login.gif" value="Submit"
alt="Submit"
onMouseover = "log.src='images/login-roll.gif'"
onMouseout ="images/log.src='login.gif'">

thank you..

Frances

Jul 23 '05 #1
2 8033


Frances Del Rio wrote:

I have a form in which submit button is an img.. would like to do it
w/a rollover, but can't get rollover to work.. can you do rollovers
w/img submit buttons? this is code I have:

<input type="image" name="log" src="images/login.gif" value="Submit"
alt="Submit"
onMouseover = "log.src='images/login-roll.gif'"
onMouseout ="images/log.src='login.gif'">


Try
<input type="image"
src="images/login.gif"
onmouseover="this.src = 'images/login-roll.gif';"
onmouseout="this.src = 'images/login.gif';"
alt="submit"
value="submit">
with modern browsers like IE5+, Netscape 6/7, Mozilla, Opera 7 I expect
that to work as intended, only old ones like Netscape 4 do not support
onmouseover/out for the input element.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #2

Martin Honnen wrote:


Frances Del Rio wrote:

I have a form in which submit button is an img.. would like to do it
w/a rollover, but can't get rollover to work.. can you do rollovers
w/img submit buttons? this is code I have:

<input type="image" name="log" src="images/login.gif" value="Submit"
alt="Submit"
onMouseover = "log.src='images/login-roll.gif'"
onMouseout ="images/log.src='login.gif'">

Try
<input type="image"
src="images/login.gif"
onmouseover="this.src = 'images/login-roll.gif';"
onmouseout="this.src = 'images/login.gif';"
alt="submit"
value="submit">
with modern browsers like IE5+, Netscape 6/7, Mozilla, Opera 7 I expect
that to work as intended, only old ones like Netscape 4 do not support
onmouseover/out for the input element.


thank you!! that worked!!

Frances


Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: sumithradevi | last post by:
Hello Friends, I have two forms(form1 and form2) on my html page. question1 : can i access form 1 variables in form 2?. if so how? question 2: when form2 action is saveci.jsp . can i access...
65
by: SamMan | last post by:
A question came up at work from one of our clients about forms on their site. The data from these forms are processed by a PHP script and if all goes well, a thank you screen appears. Sometimes,...
3
by: brett | last post by:
Using DOM in IE, how can I loop through FORMs and access FORM elements in a specific form? For example, www.hotmail.com has about 13 forms. I believe the one displayed is dependent on the URL. If...
1
by: Frances Del Rio | last post by:
I have a form in which submit button is an img.. would like to do it w/a rollover, but can't get rollover to work.. can you do rollovers w/img submit buttons? this is code I have: <input...
6
by: milkyway | last post by:
Hello there, I have the following code (written in Javascript) for posting of a form on the client side: .... var f2 = document.forms; f2.method = "post"; f2.submit();
5
by: c676228 | last post by:
Hi everyone, my colleagues are thinking about have three insurance plans on one asp page: I simplify the plan as follow: text box:number of people plan1 plan2 plan3
1
by: miguel | last post by:
Hello I would like to know if it is possible submit two html forms with only one button. I am working with JSF and the generated html code has two forms, I have one submit button out these forms and...
23
by: mosesdinakaran | last post by:
Hi All, I need a small clarification in submitting the forms, Ur suggestions please. In a page I have two form and also two submit butons. (ie)
19
Atli
by: Atli | last post by:
Introduction At some point, all web developers will need to collect data from their users. In a dynamic web page, everything revolves around the users input, so knowing how to ask for and collect...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.