Jump to content

greenwater

Members
  • Posts

    2
  • Joined

  • Last visited

greenwater's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Thank you so much! It worked! I don't think I would have figured it out on my own. I just don't know enough javascript yet. I don't understand about 90% of the code, but it works perfect. I was pulling my hair out trying to figure it out. When I get more time I will have to actually learn what all this code means and why. This has saved me probably 50 or 60 hours of work the way I was going to do it. You are a life saver.Thanks
  2. I am kind of new to java so please bear with me. Here is what I am trying to do. I am trying to get the value of a cookie that the customer has already set. Lets say the value of the cookie is already 83. cookie name is caryear and the value is 83 Now, when my the page loads I need to get the value of the cookie to check to see if it's 83 or another value. Then if the value is = 83 then display image83 else display no image. I am not finding/understanding the codes that I have found so far and nothing has worked. I am sure this code is way wrong but this is basically what I want to happen. I am sure the function is totally wrong, but I just don't get it.(I am really not stupid, just javascript stupid) <head><script> function getCookieVal (offset) { var endstr = document.cookie.indexOf (";", offset); if (endstr == -1) { endstr = document.cookie.length; } return unescape(document.cookie.substring(offset, endstr)); }</script></head> <body onload="<script>if (caryear == 83) { I want to put html code in here, like, <img src="image.jpg"> }else { I don't want anything to happen now}</script>">
×
×
  • Create New...