veluit06 Posted January 5, 2009 Share Posted January 5, 2009 hi am having one image that means <a href="www.xxxx.com" id="storecookie();" >www.xxxx.com/banners/banner.gif</a> using this "storecookie();" function i want to store my website link in that browser. when i open my browser next time my weblink should open, is it possible to do this concept, i dntknow how to start a code, but i start my script plz check the above scripts and tell me how to do this concept, if any script is there plz help me function GetXmlHttpObject() { var xmlHttp=null; try { // Firefox, Opera 8.0+, Safari xmlHttp=new XMLHttpRequest(); } catch (e) { // Internet Explorer try { xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); } } return xmlHttp; } function createCookie(name,value,days) { if (days) { var date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.cookie = name+"="+value+expires+"; path=/"; } function readCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); } return null; } function eraseCookie(name) { createCookie(name,"",-1); } function storecookie() { setcookie ("www.google.com") } Link to comment https://forums.phpfreaks.com/topic/139487-using-image-id-how-to-store-a-cookies/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.