| Back to top |
i open a webpage using javascript window.open method.
one cookie is created when i open that window. i know that cookie name.i want to delete that cookie[note- this cookie not in my system's cookie folder].how can i delete that cookie using javascript fucntion.[/b] |
|||||
|
techAdmin
Back to top
Status: Site Admin Joined: 26 Sep 2003 Posts: 747 Location: East Coast, West Coast? I know it's one of them. |
||||||
| Back to top |
it is already created cookie. just i want to delete that cookie.
for this shall i use this delete script function function Delete_Cookie(name, path, domain ) { alert(name); alert(path); alert(domain); if ( Get_Cookie( name ) ) document.cookie = name + "=" + ( ( path ) ? ";path=" + path : "") + ( ( domain ) ? ";domain=" + domain : "" ) + ";expires=Thu, 01-Jan-1970 00:00:01 GMT"; } i cal this function by onClick="Delete_Cookie('JSESSIONID','urll','http://www.uspto.gov');" where 'JSESSIONID' - cookie name urll- url of a web page i dont want to set cookie. |
|||||
|
techAdmin
Back to top
Status: Site Admin Joined: 26 Sep 2003 Posts: 747 Location: East Coast, West Coast? I know it's one of them. |
Who said you had to set the cookie? I pointed you to a script that has functions for deleting, getting, and setting cookies. So use the stuff that you need, in this case the cookie deletion component.
But since those 3 functions are required for all cookie handling, it's a lot easier to just integrate them into your script and just call each one as required. |
|||||
| Back to top |
am using the following javascript to get a cookie of a web page.
function Delete_Cookie(name, path, domain ) { chwin=window.open(path,'_blank'); alert(window.document.cookie); } it is working well. but if i give like this alert(chwin.document.cookie); it doesnot alert any thing. how can i get chwin cookie. |
|||||
|
All times are GMT - 8 Hours
|
||||||
Contact Us
Hosting: Pair Networks: 0.047
Forum Software © 2001–2006 phpBB
techForum Style © 2003–2006 techpatterns.com
info
Hosting: Pair Networks: 0.047
Forum Software © 2001–2006 phpBB
techForum Style © 2003–2006 techpatterns.com
info