PDA

View Full Version : How to make a textbox sticky



briain
Jul 9th, 2009, 06:49 PM
Hey Guys

I am looking for an easy way to make the text in a textbox 'sticky'

Basically: when a user enters a string into the textbox, then leaves the page and returns again - the text that they put into the textbox is still there, preloaded.

Any ideas?

I would reeeeeeally appreciate it!
Thanks
briain, Ireland

bazz
Jul 9th, 2009, 06:51 PM
you need to look into sessions. they store 'persistent' data from page to page, where the web page itself cannot do that.

bazz

briain
Jul 9th, 2009, 06:52 PM
Ok, will do - thanks :)

bazz
Jul 9th, 2009, 08:58 PM
you'll need either to use JavaScript sessions or php/perl/other, sessions.

JS can be switched off which will break your site system. Better I would suggest, to begin learning php/perl.

bazz

Philip M
Jul 9th, 2009, 09:01 PM
You could use a Javascript cookie. But as bazz says JS can be disabled.

jmrker
Jul 9th, 2009, 10:08 PM
Alternatively, if only need to retain value on local computer,
would be to use a 'cookie' to save and restore the value.

Numerous examples on the web.

Problem might be if 'cookie' function turned off by user.
If so, they probably won't use your page anyway.


D**n, 'PhillipM' beat me again! :mad:
:D

Philip M
Jul 9th, 2009, 10:30 PM
D**n, 'PhillipM' beat me again! :mad:
:D


He who laughs last, thinks slowest. :D:D

bazz
Jul 10th, 2009, 01:29 AM
Problem might be if 'cookie' function turned off by user.
If so, they probably won't use your page anyway.


D**n, 'PhillipM' beat me again! :mad:
:D

not by much he didn't :D