Kaan
Kaan

Reputation: 896

on page refresh, need to get values of inputs

When I fill the input's and hit refresh button, I could not get the values of input in jquery.

How can get them without using cookies?

Upvotes: 0

Views: 355

Answers (3)

hungryMind
hungryMind

Reputation: 7009

Don't think so. Where you want to store the input data?

window.onunload = function(){ ;}

Using this you have to store data some where, you decide. IE provides, some browser memory to store such data for the page, you can use that. I do not remember exact syntax (probably window.external), and not sure about other browsers

Sample code (IE only)

<SCRIPT>
function fnSaveForm(){
   window.external.AutoCompleteSaveForm(oForm);
}
window.onunload = function(){fnSaveForm();}
</SCRIPT>

Upvotes: 1

DVK
DVK

Reputation: 129481

You can not "get" them without storing them somehow.

You can store them either on the client (via cookies or HTML5 local storage) or on the server in a session data or other persistence mechanism (via AJAX call)

Upvotes: 1

polarblau
polarblau

Reputation: 17744

Your are not able to retrieve them in this case without using some sort of storage like a local storage, a cookie, etc.. Why would you need such a behavior?

Upvotes: 2

Related Questions