Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
|
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 8th, 2005, 09:28 PM
Authorized User
 
Join Date: May 2005
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default echoing textfields and reset problem

Hi,

In creating a registration form for users on my site, i decided to echo the details entered by the user, back into the field,so that if he pressed submit by mistake etc, the form would show what he has typed so far. I then have a reset button, which has a function that prompts the user - 'reset the form - yes/no'.

Whats weird is this.... because i am echoing the fields back on themselves, by using reset, it will not clear the form at all.
If i stop echoing the fields, the reset button works fine.

The code to echo the text fields, is shown below below, in this example for the 'email' field on the form

<?php echo @$email ?>



my reset button is as follows:
<form name="regform" form method='post' action='register_new.php' onreset="clearform(this)">

Does anybody know, how i can keep the form so that it echoes its contents back, but when i press reset, it clears the whole form?


Thanks
Steve







Similar Threads
Thread Thread Starter Forum Replies Last Post
how to reset the SessionID? akkad C# 2 October 24th, 2007 06:49 AM
enable/disable textfields based on radio selection carrie.mims Javascript How-To 5 December 8th, 2006 05:41 AM
Reset Not responding Swati_Jain ASP.NET 1.0 and 1.1 Basics 1 June 8th, 2006 02:12 PM
Formatting textfields WitchHunter Beginning VB 6 1 January 17th, 2006 04:36 AM
how 2 reset a form kanoorani Javascript How-To 6 October 10th, 2005 05:45 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.