Click to See Complete Forum and Search --> : Calling a asp function from a button


fark
10-03-2003, 04:23 PM
I would like to do this
<INPUT TYPE="button" VALUE="Store Cookie" OnClick="return Cookie()"></INPUT>
Is this possible? I want to store the values of a form in a cookie when the user clicks a button. Is this possible?

Jona
10-03-2003, 10:00 PM
Yes, but there is a limit on the amount of data you can put in a cookie, so it will have to be a small form. Your code would look more like this:


<input type="button" onclick="setCookie();" value="Store Cookie">


If the data will only be tempoary, however, and is not very long (a maximum of about 200 characters), you can use the GET method of the form and parse the URI.

[J]ona