How to make a box that is assigned a link that the user enters into the input box below, while keeping the link for this user when you visit the page again?
2 answers
The example below (based on the jQuery cookie plugin) stores in cookie the value entered by the user in the input field in the browser. It is easy to expand to multiple input fields.
HTML:
<input name="something" type="text" />
Jquery:
$('[name=something]').each( function() { // Восстановить из куки var name = $(this).attr('name'); if ($.cookie(name)) { $(this).val($.cookie(name)); } // Сохранить в куки $(this).change( function() { $.cookie(name, $(this).val(), { path: '/', expires: 7 }); } ); } );
|
5 times re-read, did not understand :( Try to rephrase the question.
Not quite sure, but it seems to me that we are talking about html and javascript and that something needs to be saved. If this is the case, then as an option, you can save the data in a cookie via javascript or on the server side (php, java, asp, etc)
|