Resubmit form...?

  • s15199d
  • Expert
  • Expert
  • User avatar
  • Joined: Feb 20, 2004
  • Posts: 524
  • Loc: NC, USA
  • Status: Offline

Post May 28th, 2004, 12:41 pm

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 = ""?
Image
Give a man a fish he eats for a day. Teach a man to fish he eats for a lifetime.
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post May 28th, 2004, 12:41 pm

  • Carnix
  • Guru
  • Guru
  • User avatar
  • Joined: Apr 28, 2004
  • Posts: 1099
  • Status: Offline

Post May 28th, 2004, 1:27 pm

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
  • Joined: Feb 20, 2004
  • Posts: 524
  • Loc: NC, USA
  • Status: Offline

Post May 28th, 2004, 1:41 pm

Very cool & extremely useful! Thanks soo much!
Image
Give a man a fish he eats for a day. Teach a man to fish he eats for a lifetime.
  • s15199d
  • Expert
  • Expert
  • User avatar
  • Joined: Feb 20, 2004
  • Posts: 524
  • Loc: NC, USA
  • Status: Offline

Post May 28th, 2004, 1:45 pm

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
Image
Give a man a fish he eats for a day. Teach a man to fish he eats for a lifetime.

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: No registered users and 149 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
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.