473,385 Members | 1,655 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,385 software developers and data experts.

use imagebutton to reset form..

How can I reset a form using an Image Button.. I tried using and HTML
button and some javascript to reset the form, but it doesn't work.. any
suggestions?

Jul 21 '05 #1
3 3572
Brian,

Some plain old javascript will do the trick for you. Just add a regular
<img> tag and add an onclick handler that will call the form's reset() method.

Example:
<img src="myimage.jpg" onclick="document.forms[0].reset()">

HTH
Jorge

"Brian" wrote:
How can I reset a form using an Image Button.. I tried using and HTML
button and some javascript to reset the form, but it doesn't work.. any
suggestions?

Jul 21 '05 #2
onclick="formname.reset()" won't work?
Jul 21 '05 #3
I didn't try just using an image.. I tried using the imagebutton and
setting some javascript on that.. wouldn't work.. It just submitted the
form.. Jorge, I will try that image thing for reference. I
convinced them to just remove the reset button. That is a much easier
solution.. lol.. Thank you both for your replies..

Jul 21 '05 #4

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

Similar topics

1
by: Sue | last post by:
For performance purposes, I am using client-side scripts to show-hide (via css display: hide, display: block) several rows of a table depending on which imagebutton is clicked. Because of workplace...
2
by: Chuck Hartman | last post by:
I've been trying to add an ImageButton object to a Calendar table cell, but so far I am unable to handle the Command event from that button in my form's code behind. Below is an example of what I...
1
by: Gill Smith | last post by:
when the page is loaded I am using onload event at the client side and setting the focus on the control(TextBox). However when the user clicks on Clear ImageButton, I am clearing all the text boxes...
3
by: Benjamin Gavin | last post by:
Hi all, I recently stumbled upon a bug in the ASP.NET framework handling of ImageButton based postbacks. The issues derives from the fact that IE and Mozilla handle the case of a missing image...
2
by: CJ Oakwood | last post by:
Morning - I am hoping somebody from this group can help me out here... I have been trying to add an array of ImageButtons to my WebForm however I keep getting an exception that I can't seem to...
13
by: tperri | last post by:
I have an HTML table with several fields like this: <A href="Savings.aspx?category=Food"><asp:imagebutton id="imgFood" ImageUrl="images\buttons\btn-food-i.gif"...
3
by: Brian | last post by:
How can I reset a form using an Image Button.. I tried using and HTML button and some javascript to reset the form, but it doesn't work.. any suggestions?
0
by: Tom Edelbrok | last post by:
I'm using VS 2005 to develop an intranet asp.net web application and I get a weird situation. If I start out with any ASPX page that contains an ImageButton control followed by a TextBox control,...
4
by: Benny Ng | last post by:
Dear All, <input type="checkbox" name="chkAgreement" value="0">I agree with the above terms and conditions <asp:ImageButton ID="ImgBtnSubmit" Runat="server" CausesValidation=True...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

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.