Hi I have a small problem. Currently I have 2 parameters saved in the browser cookie which are ADV and LOC… Now I have a page with a form and the form got two hidden fields :
<input type="hidden" name="adv" value="" />
<input type="hidden" name="loc" value="" />
I need to get the values of adv and loc from the cookie and save them in the hidden form fields… How can i do this please? Thanks
document.cookiewill get you all the cookies in the following format:To get a value from a cookie, you can use this function (from quirksmode):
To fill in the hidden fields, you can loop though all the hidden fields, and get their respective cookies:
And then modify
<body>to have anonload.Or with jQuery: