| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| NamePros Member Join Date: Apr 2007
Posts: 28
![]() | Help Me With Cookies, HTML and IE8 Help Me With Cookies, HTML and IE8 For complex reasons, I have to use HTML with JavaScript to set a cookie. I know it is easy to set and get cookies PHP but I have to put the code in HTML. I have searched the internet for some examples and I ran a test based on an example. I ran this Javascript code: ????: NamePros.com http://www.namepros.com/programming/702146-help-me-with-cookies-html-ie8.html Code: <SCRIPT LANGUAGE="JavaScript">
function putCookie()
{
cookie_name = "specialcookiehuge";
if(document.cookie != document.cookie)
{
index = document.cookie.indexOf(cookie_name);
}
else
{
index = -1;
}
if (index == -1)
{
document.cookie=cookie_name+"; expires=Monday, 04-Apr-2020 05:00:00 GMT";
}
}
</SCRIPT> Code: document.cookie=cookie_name+"; expires=Monday, 04-Apr-2020 05:00:00 GMT"; I tried to find this cookie (Tools --> Internet Options --> Browsing History -->Settings) And I did not find anything named "specialcookiehuge" in "View Objects" or "View Files". I guess I could try other browsers, but it would be good to know what I am doing wrong. I do not know if I am really setting a cookie. Is there some additional javascript command I am missing? Or, is the cookie being set but I am not looking in the right place according to the tutorials I saw online?
__________________ There is nothing stronger than human will. Nothing can stop it. |
| | |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Link background image problem in IE8 | immediate | Programming | 3 | 10-15-2010 02:32 AM |
| Flash On IE8 Problem | dezinerite | Web Design Discussion | 2 | 12-18-2009 08:14 AM |
| Is really wrong to use depreciated HTML? | thenext88 | Programming | 8 | 03-24-2009 12:04 PM |
| My CSS must be terrible... DIV not displaying at all in FF3, works fine in IE8 | thenext88 | Programming | 4 | 03-02-2009 02:01 PM |
| How can you convert a PSD to HTML? | ichsie | Programming | 0 | 10-27-2008 07:04 PM |