|
Webteacher Software now offers
//Define contents of page contents=
Creating long strings of textThe example above shows an entire HTML page defined into one variable, named contents. There are 2 reasons why I put a plus sign at the end of each line, instead of simply writing one long line of text. First, the document is much easier to read and edit this way. Second, there is a limit on how long a line of JavaScript can be. I don't know exactly what the limit is, but I know that I get errors when I create very long lines in my script. The plus sign helps me break the definition of con tents into 7 small lines instead of 1 big one.
Notice the bottom 3 lines. They create a HREF link around your text. message is the contents of your sample text. If message="Hello" then the last 3 lines would read
As you can see, the <A HREF> tag can be used to trigger javascript events instead of creating a link to another page. We will discuss this in more detail later.
| ||||
Home | WebData - Web Database Software | Javascript | CGI | Consulting | Map Builder | Contact Us | The Press Room |