I'm looking to read and write a cookie on my page. Preferably write the cookie on the
JSP code and read the cookie on the
Servlet to preserve what the preference of the user is. The issue I�m having is this. I need to click on a link and execute some JavaScript in order to write the cookie.
I could do it this way
<a href="http://www.javaranch.com" onklick="alert('here');">
test</a>
however when this code executes Internet Explorer ends up warning the user of scripts running. Is there a better way to write this code so this warning doesn�t come up? I�m also looking to have this be �search engine� safe. In other words I want the search engines to still follow the link to the products that are under the link.