Re: save as you type

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

 



You could do it with javascript, but its stupid since it'll consume a lot of processes (1 for each character typed).
Tell the users to not forget it.
Or as alternative:


1 <html>
2 <script>
3 var submited = false;
4 function unloadConfirm()
5 {
6 if (!submited) {
7 save = confirm("Do you want to apply changes?");
8 if (save) {
9 document.form1.submit();
10 }
11 }
12 }
13 </script>
14 <body onUnload="unloadConfirm();">
15 <form name="form1" action="script.php" method="post">
16 <input type="text" name="text1" onChange="submited = false;"
17 <input type="submit" value="Apply changes" onClick="submited
18 </form>
19 </body>
20 </html>


When the user quits the page and the form wasn't submited yet, it will ask to apply.

Rodrigo K


-----Original Message----- From: Matthew Perry [mailto:matt@xxxxxxxxxxxxxxxxxxxxxx] Sent: 12 December 2004 05:12 To: php-db@xxxxxxxxxxxxx Subject: save as you type

Is there a way to make an input box save data into a database as users
type? My users keep forgetting to press my "apply changes" buttons.
Matthew

--
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

--
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