Assigning large multi-line HTML/text blocks to variables

Discussion in 'Javascript' started by Catherine Lynn Wood, Dec 3, 2003.

  1. 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
     
    Catherine Lynn Wood, Dec 3, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. xyz
    Replies:
    3
    Views:
    622
  2. goldtech
    Replies:
    33
    Views:
    1,045
    Sibylle Koczian
    May 2, 2010
  3. Andrew

    printing large blocks of HTML in ASP

    Andrew, Jan 8, 2004, in forum: ASP General
    Replies:
    9
    Views:
    218
    Stephen Willingham
    Jan 10, 2004
  4. matt
    Replies:
    1
    Views:
    285
    George Ogata
    Aug 6, 2004
  5. weston
    Replies:
    1
    Views:
    265
    Richard Cornford
    Sep 22, 2006
Loading...

Share This Page