• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

onload function

 
Reshma Reddy
Ranch Hand
Posts: 197
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...


Regards,
vardhan

[ 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
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Eric
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64959
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic