Two Laptop Bag
The moose likes JSF and the fly likes onload function Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "onload function" Watch "onload function" New topic

onload function

Reshma Reddy
Ranch Hand

Joined: Dec 21, 2006
Posts: 197
Hi flocks,

i am new to javascript, i developed my pages in jsf,in my module i have five pages when i open page1(assume page name is page1) this page having text fields by using this the customer can search for particular cargo and this is working fine and he will finish with his work in this page and moves to page2 and done something in page2 after that the user will access page1 again after opening this page it is opening what ever fields he searched before,

here i want to do resset all values what ever user entered at first time(as of i know by using onload in body this can be sloved).by using javascript it is possible to slove this problem,

send me any example links

Please help me to slove this...


[ September 05, 2008: Message edited by: vardhan reddy ]

[ September 05, 2008: Message edited by: vardhan reddy ]

[ September 05, 2008: Message edited by: vardhan reddy ]
[ September 11, 2008: Message edited by: vardhan reddy ]
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
onload is JavaScript so I am confused.

If the initial values are there, is the user using the back button. Personally I think that is nice if the fields have the previous value! If you have a solution that is working now with resetting the form fields, you probbaly should stick with it.

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63847

As JSF sticks its fingers into so many pieces of the pie, I think this would make a lot more sense to discuss in the JSF forum.
[ September 05, 2008: Message edited by: Bear Bibeault ]

[Asking smart questions] [About Bear] [Books by Bear]
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
Either use a request scoped bean instead of a session scoped bean, or clear the session scoped bean at the end of the conversation.

No need for awful Javascript hacks.
I agree. Here's the link:
subject: onload function
It's not a secret anymore!