[thelist] Document.write Issue

Syed Zeeshan Haider szh at hotpop.com
Mon Apr 29 15:59:01 CDT 2002


Hi Josh,
I tried this situation in my PC and it worked well.
Put this line:

thelink = listoflinks[x].split('%e%q%')

in head section, instead of body section. By doing this, you will need
to put some "if else" situation in body section instead of "function
links()".
I hope this will work.
Syed Zeeshan Haider.
http://syedzeeshanhaider.faithweb.com/

----- Original Message -----
From: Feingold Josh S <Josh.S.Feingold at irs.gov>
To: "'thelist at lists.evolt.org'" <thelist at lists.evolt.org>
Date: Mon, 29 Apr 2002 11:06:00 -0400
Subject: [thelist] Document.write Issue
Reply-To: thelist at lists.evolt.org

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