Re: [PHP] Re: Non-Javascript PHP Onsubmit function?

2005-10-08 Thread Oliver Grätz
Jasper Bryant-Greene schrieb:
 I disagree. Best solution: Don't use a confirmation thing, provide the 
 ability to undo changes instead. That way you don't piss off the 
 advanced users who KNOW what they're doing, but you still allow the less 
 advanced users to undo changes they accidentally make.

Oh, changing the concept was on the menu? Me too,please ;-)

OLLi

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Non-Javascript PHP Onsubmit function?

2005-10-07 Thread Oliver Grätz
zzapper schrieb:
 Hi,
 I'd like to have a non-Javascript based general purpose Are you quite Sure? 
 PHP form submitter,
 conventionally done using the Javascript Onsubmit Event.
 
 One way would be to store all the Form Variables in hidden fields generated 
 by a foreach $_POST 
 but anyone have anything simpler?

How about the user saying no? You would have to return to the form
page and repopulate the form with the data. So not storing the data in a
usable format is not an option.

Here's a dirty hack:
How about displaying the same form in a hidden DIV?
OK, that one was cruel...

A better one:
You could fetch the RAW post data and store it in the session.
Problems arise when there's more than one window open!
Use a unique ID for the form.

Best solution: Use the hidden fields!


AllOLLi


Sidney: Are you sure you don't wanna stay for dinner.
Eric: I'd love to but... I gotta save the world.
[Alias 402]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Non-Javascript PHP Onsubmit function?

2005-10-07 Thread Jasper Bryant-Greene

Oliver Grätz wrote:

zzapper schrieb:


Hi,
I'd like to have a non-Javascript based general purpose Are you quite Sure? 
PHP form submitter,
conventionally done using the Javascript Onsubmit Event.

One way would be to store all the Form Variables in hidden fields generated by a foreach $_POST 
but anyone have anything simpler?



How about the user saying no? You would have to return to the form
page and repopulate the form with the data. So not storing the data in a
usable format is not an option.

Here's a dirty hack:
How about displaying the same form in a hidden DIV?
OK, that one was cruel...

A better one:
You could fetch the RAW post data and store it in the session.
Problems arise when there's more than one window open!
Use a unique ID for the form.

Best solution: Use the hidden fields!


I disagree. Best solution: Don't use a confirmation thing, provide the 
ability to undo changes instead. That way you don't piss off the 
advanced users who KNOW what they're doing, but you still allow the less 
advanced users to undo changes they accidentally make.


--
Jasper Bryant-Greene
Freelance web developer
http://jasper.bryant-greene.name/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Non-Javascript PHP Onsubmit function?

2005-10-04 Thread zzapper
On Tue, 4 Oct 2005 15:50:06 -0400,  wrote:

Nope.. you're pretty much stuck using Javascript or processing it all on the 
back end with PHP as you described.  You could store the data in a database or 
a $_SESSION variable but without using something client-side, you're going to 
have to juggle it all with PHP.

Thanks

-- 
zzapper
Success for Techies and Vim,Zsh tips
http://SuccessTheory.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php