Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Assigning large multi-line HTML/text blocks to variables

Reply
Thread Tools

Assigning large multi-line HTML/text blocks to variables

 
 
Catherine Lynn Wood
Guest
Posts: n/a
 
      12-03-2003
I am working on a dynamically built HTML in both ASP and client-side
scripting. A current step I am working on will vary the content of a table
cell based on tab items clicked by the user. I wish to have the cell
content changed from an HTML table (created by the ASP when the page is
served up) or alternately a number of image files.

I am assuming that the innerHTML construct is the best fit to do this but
that will mean that the HTML table will need to ultimately be assignable to
that innerHTML DOM object. So what I need to know is, how to take a chunk
of HTML or text in general that consists of multiple lines and assign it to
a single variable short of wrapping quotations around each line along with
an endless number of concatenation operators.

I know that unix scripting languages like to use a <<EOF type construct to
do this, but I am not aware if there is anything similar in javascript to do
the same thing. If all else fails, I will go back to the individual dom
properties to build my HTML there, but I was curious if there was a way just
to grab a block of text in a javascript variable...

Kathy Lynn


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Methods and blocks - not that clear when blocks passed into Steven Taylor Ruby 9 04-27-2009 08:46 AM
Assigning methods to objects, and assigning onreadystatechange to an XMLHttpRequest -- an inconsistency? weston Javascript 1 09-22-2006 09:33 AM
"Building Blocks" are "Application Blocks" Arjen ASP .Net 3 02-27-2005 01:06 AM
procs/blocks - blocks with procs, blocks with blocks? matt Ruby 1 08-06-2004 01:33 AM



Advertisments