Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 8th, 2005, 09:28 PM
Authorized User
 
Join Date: May 2005
Location: , , .
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


Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 09:42 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.