[code]
<HTML>
<HEAD>
<TITLE></TITLE>
<SCRIPT LANGUAGE=”JavaScript”>
function setCookie(name, value, expires, path, domain, secure) {
document.cookie = name + “=” + escape(value) +
((expires) ? “; expires=” + expires.toGMTString() : “”) +
((path) ? “; path=” + path : “”) +
((domain == null) ? “” : (“; domain=” + domain)) +
((secure) ? “; secure” : “”);
}
</SCRIPT>
</HEAD>
<BODY>
<BR>
<FORM>
User ID: <INPUT TYPE=TEXT NAME=UserID>
<BR>
<INPUT TYPE=BUTTON VALUE=”Create Cookie”
onClick=’setCookie(“UserID”, document.forms[0].UserID.value,null,”/”,”www.google.com”);’>
</FORM>
</BODY>
</HTML>
this code is not setting the domain name in the browser cookie.
how can i correct it ?