How to save onclick event in cookie?

M

marco krechting

Stephen,

I have a page with a lot of hyperlinks. They are build up in javascript.
I want to save in a cookie if the link was visited before (this day).

d=document;zoek2=0;tel=0;function telt(){tel++;return tel};
a="<"+"a href='";
b2="<"+"a href='http://cww.";L="</"+'a><br>';

function HW(link,tekst,clipdata) {
target=telt();
if (wi==1) {
target="_top";
}

text2write = b2 + link + "'" + tag + target + "'";
text2write += "onclick='setClip(\"" + clipdata + returnDate() +
"\");";
text2write +=
"n(\""+target+"\",\""+"http://cww."+link+"\",\""+tekst+"\")'";
text2write += ">" + tekst + L;

h(text2write);

}

function setClip(clipdata) {
if (window.clipboardData) {
window.clipboardData.setData('text', clipdata);
}

}

function n(target,naam,stat){
if(stat==null||stat=='')wo=(naam.substring(7,naam.length));else
wo=stat
link=""
for(t=1;t<=wo.length;t++)

{if(wo.substring(t-1,t)=="."||wo.substring(t-1,t)=="/"||wo.substring(t-1
,t)==";"||wo.substring(t-1,t)=="&")link+="-"
else link+=wo.substring(t-1,t)}
sd=new Date();arnostat(escape(link));
if(wi==0){if (parseInt(navigator.appVersion)>=4){

target=window.open("",target,y+((screen.width/100)*80)+",height="+(((scr
een.height/100)*85)-200)+",left="+((screen.width/100)*9)+",top="+((scree
n.height/100)*14))}
else {target=window.open("",target(),y+"600,height=280")}}
if(wi==1)top.location=naam
if(wi==2){if(parseInt(navigator.appVersion)>=4){

target=window.open("",target,y+((screen.width/100)*99)+",height="+(((scr
een.height/100)*107)-200)+",left=0,top=0")}
else{target=window.open("",target,y+"600,height=280")}}
if(wi==3)target=window.open("",target);
if (zoek2==1){zoek2=0; target.location=site;}
if (wi!=1) target.focus()}

<SCRIPT language=javascript>

HW('myweblink/2005/Rep','Reports 2005','MWL.BRIEF.2005.') Etc...

</SCRIPT>

Regards,
Marco
The Netherlands
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,781
Messages
2,569,615
Members
45,295
Latest member
EmilG1510

Latest Threads

Top