Javascript string problem

by =?iso-8859-1?q?Brian=20Blackett?= <bwblackett(at)yahoo.com>

 Date:  Thu, 2 Aug 2001 16:54:02 +0100 (BST)
 To:  hwg-techniques(at)hwg.org
  todo: View Thread, Original
Are there any Javascript experts out there ?

Can anyone explain why the first link works but the
second doesn't ? (and how I can fix it !)

It's something to do with space between the word and
the number.

<html>
<head>
<script>

function text(text)
{
infowin=open('','Picture','width=300,height=50,status=no,toolbar=no,menubar=no');
infowin.document.open();
infowin.document.write("<html><body>"+text+"<br></body></html>");
infowin.document.close();
}

function caller(text)
{
docWrite = ""
docWrite += "<a href='#'
onClick=text('"+text+"');>Click here</a><br>"
return docWrite
}

</script>
</head>

<body>

<script
language='JavaScript'>document.write(caller('Link1'))</script>
<script
language='JavaScript'>document.write(caller('Link
2'))</script>

</body>
</html>

Thanks,
Brian

www.blackettwebsitebuilders.net

____________________________________________________________
Do You Yahoo!?
Get your free (at)yahoo.co.uk address at http://mail.yahoo.co.uk
or your free (at)yahoo.ie address at http://mail.yahoo.ie

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA