I have a form and I have set cookies to the input fields. I can find the cookies in resources
when I go to inspect element
. The code is confidential so I can't show how I set my cookies. But I am sure that I can find the selected input fields in resources->cookie.
The same form appears in all the pages. When I redirect from one page to other page the form fields which I selected must appear in all the pages.
I used the below code for getting the cookie value
<script type="text/javascript">
$(document).ready(function() {
if(input1 = getCookie("input1 "))
document.myform.input1.value = input1 ;
});
</script>
but I am getting error as Uncaught ReferenceError: getCookie is not defined
Can anyone suggest what would be the reason for this error? and how do I get the get cookie value to the input field?