RE: Post without user hitting submit button

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If I understood your question, you can use a JavaScript to take care of the
submission for you. Hitting Submit is a client side action, so you have to
handle it in the browser instead of on the server with PHP. Maybe something
like checking to make sure all fields are valid with an onBlur() script. Of
course, you'd have to force the onBlur() after a certain number of
characters are entered in the second field (kind of like autotabbing) in the
second field.

For example, if you have two fields, username and password for example, when
the user fills in the username field and attempts to leave the field, fire
an onBlur() to check the field. Require the password field to be a certain
number of characters and when that number of chars has been entered, set up
the field to autotab and you should be able to validate that field as well.

I haven't implemented anything like this myself, but it might do the trick.
As far as the autotab stuff, you should be able to find a really simple
script on javascript.com or someplace like that. Make sure you test in IE
and NN though just to make sure the code works both ways.

There may be other more elegant ways of handling it, but this simple
suggestion should do the trick.

Hope this helped.

> -----Original Message-----
> From: Alberto Grájeda C. [mailto:beto@teleinf.upb.edu]
> Sent: Wednesday, February 12, 2003 8:31 AM
> To: php-db@lists.php.net
> Subject:  Post without user hitting submit button
> 
> 
> The problem:
> register.php {objetive: Validate users in email server}
> register.php has form1 (take email and emailpassword), with this 
> information and validating to the user in email server, I search in 
> database other information (user_cod, password2), 
> this information must be sent to a cgi via post to 
> data.cgi(not php file). 
> 
> How can I send a form2 (user_cod, password2), without user 
> hitting submit 
> button??. or what method can I use??
> 
> I will appreciate any help.
> 
> Thanks all.
> 
> 
> 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

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



[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux