• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

onload function

 
Ranch Hand
Posts: 197
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 67735
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Farmers know to never drive a tractor near a honey locust tree. But a tiny ad is okay:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic