To pop open the alert box I am assuming you call a javascript function.
<INPUT Type="Submit" Name="Submit" Value="Create Workorder" onclick="return VerifyForm(this.form)">
Usually you would do onclick="VerifyForm(this.form)"
but by changing it to: onclick="return VerifyForm(this.form)"
You tell javascript to go to the page only if you return true.
function VerifyForm(form) { if (Values == true) { return true; } else { alert(); return false; } }
With any browser 5.0 or older this will work.
Now, with PHP you need to pass the information back to the form either through a URL or in session variables.
I hope this helps some,
Jonathan Pitcher
On Monday, March 3, 2003, at 12:43 PM, Mirco Ellis wrote:
Hi, I am doing my error checking with php. I use a javascript alert box to
warn the user. It is all very simple.
-----Original Message----- From: Jonathan Pitcher [mailto:[EMAIL PROTECTED] Sent: Monday, March 03, 2003 20:34 To: [EMAIL PROTECTED] Subject: Re: [PHP] Keeping existing data in textarea's
Micro,
Are you doing your error checking with Javascript or PHP. Makes a big difference.
Jonathan Pitcher
On Monday, March 3, 2003, at 12:30 PM, Mirco Ellis wrote:
Hi, I have a developed a simple Helpdesk for our small company. When
users
log calls they get an alert message warning them that they must fill
in all
the fields if they have missed a field. At the moment if they happen to
forget a field, they receive the alert message, but then have to start
all
over again. How do I keep the existing data in the textareas from
dissapearing after the alert message?
Mirco
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php