aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Resetting Values in JSP Page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Resetting Values in JSP Page" Watch "Resetting Values in JSP Page" New topic
Author

Resetting Values in JSP Page

Deepak Chawla
Ranch Hand

Joined: Nov 19, 2003
Posts: 50
I have JSP form Page and i want to reset values in form

[edit:reformated code so easier to read]

When i try to click on Reset , it only reset value fromtextarea which is labeled as "Notes/issues/open items", not from other fields. I don't know why. can anyone please help

[ December 19, 2003: Message edited by: Eric Pascarello ]
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30752
    
156

Deepak,
Your code works for me. What browser are you using. The code resets the fields (to empty) and checks the check box.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
S Chandra Mohan
Ranch Hand

Joined: Oct 19, 2000
Posts: 75
hi
can u pls give the html output, which will be easier to check.


Have a wonderful day and wish u success<p>S Chandra Mohan<br />sc_mohan_us@yahoo.com
Deepak Chawla
Ranch Hand

Joined: Nov 19, 2003
Posts: 50
I am using IE 5.5
This is my HTML output

[edited: Reformatted Code So easier to read]
[ December 19, 2003: Message edited by: Eric Pascarello ]
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
an if statment in javascript uses == not =
Bear, bump this to the javascript forum since this is not a jsp problem...
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
The reset button only clears the data to what was orginally there when the page loaded. So if you are placing values into the fields from the jsp page, then that is what is going to show.
If you want to get rid of that then yo need to have a function hat loops through the elements and clears them.
Eric
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61413
    
  67

Moving to the HTML/Javascript forum.
bear


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
S Chandra Mohan
Ranch Hand

Joined: Oct 19, 2000
Posts: 75
hi
is your problem solved ?
I tried the code, its giving javascript error.
Will check out
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Resetting Values in JSP Page