Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

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: 67634
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.
 
F is for finger. Can you stick your finger in your nose? Doesn't that feel nice? Now try this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic