Validate cookie value onsubmit

wxdqz

New Member
I have some pages that sets a cookie called:- PT_NumToDoList

I can get the cookie using: -
GetCookie('PT_NumToDoList');

This cookie (if it has been set) is a numerical value

What I want to do on one particular page is validate a form (onsubmit) by checking that this value exists and that it is not more than 3

So if PT_NumToDoList is null I would like one Pop-up message to advise that "You must have selected at least on item in the list"

and if PT_NumToDoList is greater than 3, I would like a different Pop-up message to advise that "3 sample maximum, the number of items in the list must be decreased"

Hope someone can help.

Charley.
 
Back
Top