Resubmit form...?

  • s15199d
  • Expert
  • Expert
  • User avatar
  • Posts: 524
  • Loc: NC, USA

Post 3+ Months Ago

If I submit a form to itself with cache set to "Refresh" would that effective clear my from?

If not, is there a good way I can clear the almost 25 textboxes I have on this form...without having to set each one individually = ""?
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Carnix
  • Guru
  • Guru
  • User avatar
  • Posts: 1098

Post 3+ Months Ago

Code: [ Select ]

<a HREF="#" onClick="do_reset('document.myform');">click</a>

<script>
function do_reset(formobj){ formobj.reset(); }
</script>
  1. <a HREF="#" onClick="do_reset('document.myform');">click</a>
  2. <script>
  3. function do_reset(formobj){ formobj.reset(); }
  4. </script>


I didn't test it... but that's the call to use. document.formname.reset() will work too if you're not using object references.

.c
  • s15199d
  • Expert
  • Expert
  • User avatar
  • Posts: 524
  • Loc: NC, USA

Post 3+ Months Ago

Very cool & extremely useful! Thanks soo much!
  • s15199d
  • Expert
  • Expert
  • User avatar
  • Posts: 524
  • Loc: NC, USA

Post 3+ Months Ago

Yea...that's soo simple...I hate that I didn't know about that function....I coded many - a - pages with
Code: [ Select ]
document.formname.object.value = ""


As you can imagine...with a bunch of objects that gets real long...

Thanks again

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: No registered users and 57 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.