Dear Expert,
I have the website where the html web Forms are exist……. so i just want to once people fill the form . the next time the fields automatically filled out. because fields are same to all web forms.
Please give me the script or any suggestion
Thanks
Sagheer
[code=html] <input type="text" name="name" class="cookie" value="" /> <input type="text" name="password" class="cookie" value="" /> <input type="text" name="email" class="cookie" value="" /> <input type="text" name="message" value="" /> <textarea name="address" class="cookie"></textarea> [/code]
[CODE] $(function(){ var prefix = 'cook'; $('.cookie') .each(function(){ if(!$(this).val()){ $(this).val(getCookie(prefix+$(this).attr('name'))) } }) .change(function(){ if($(this).val()){ setCookie(prefix+$(this).attr('name'),$(this).val(),365); }else{ deleteCookie(prefix+$(this).attr('name')); } // alert(document.cookie); }) }) [/CODE]
Help @sagheer_rajper spread the word by sharing this article on Twitter...