• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Jeanne Boyarsky
Saloon Keepers:
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Piet Souris
Bartenders:

Cookie Issue

 
Ranch Hand
Posts: 515
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Doing that



Should not bring up a warning when it is running on a server. Only reason I would see an Active COntent thing running is if you are running it off the file protocol and not an http one.

Eric
 
Dale DeMott
Ranch Hand
Posts: 515
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So if this is posted up on a server rather than me running off of my C drive, it should work fine and NOT put up that warning. Correct?
 
It runs on an internal combustion engine. This ad does not:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
    Bookmark Topic Watch Topic
  • New Topic