Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript_howto thread: How do i get my Javascript to read over many lines?


Message #1 by "Lucy Robinson" <lucy@v...> on Tue, 28 Jan 2003 10:34:25
To add/create a long string, you can do it like this:

var strMyString =3D '<table>';
strMyString +=3D '<tr>';

etc...


/Robert


-----Original Message-----
From: Lucy Robinson [mailto:lucy@v...]
Sent: den 28 januari 2003 11:34
To: JavaScript HowTo
Subject: [javascript_howto] How do i get my Javascript to read over many
lines?


Hi there

I'm very new to Javascript so please am sorry if this is an easy query.

I have a dropdown box containing 2 items. If a user chooses option 1,
then
i want table 1 to appear below it. If a user chooses option 2, then i
want
table 2 to appear below it.

At the moment my tables are only one cell each so this is not a problem
to
do. However, the table i want to appear is a registration table where
users can fill in loads of different boxes etc. If i place my large
table
within the javascript switch function, obviusly all the coding within
that
tables goes over many lines, and not just one, and so my page kicks up
an
error message. How do i get the javascript to read the whole table? Is
there something that i can put at the end of each line of code so that
the
javascript continues to read my table?

Thanks in advance

Lucy

  Return to Index