[thelist] Document.write Issue

Feingold Josh S Josh.S.Feingold at irs.gov
Mon Apr 29 10:07:01 CDT 2002


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
--
[ Picked text/plain from multipart/alternative ]
I am trying to write one of my cookies in the body of my document.  For
example:

TextTextTextTextText
TextTextTextTextText
TextTextTextTextText
TextTextTextTextText

Cookie

TextTextTextTextText
TextTextTextTextText
TextTextTextTextText
TextTextTextTextText


The code that searches for the existance of the cookie exists in the <head>
of the page. If the cookie exists, the code in the <head> calls a function
which I have placed in the body of the page:

function links() {
  document.write ("<b>Current Links</b><br>")
  for (x=0;x<listoflinks.length - 1;x++) {
   thelink = listoflinks[x].split('%e%q%')
   document.write("<a href='" + thelink[1] + "'>" + thelink[0] + "</a>
<br>")
  }
}

The problem is that when the function is called, it redraws the entire page.
All I am left with is:

Cookie

So how do I Javascript it to simply write the cookie and leave the rest of
the page intact?

Thanks,
Josh



More information about the thelist mailing list