RE:
by Rebecca Campbell <rcampbel(at)standard.com>
|
| Date: |
Tue, 18 Jan 2000 15:29:04 -0800 |
| To: |
"'Alan Greiner'" <greiner(at)gowrie.k12.ia.us>, "'Hwg-Techniques'" <hwg-techniques(at)hwg.org> |
| |
todo: View
Thread,
Original
|
|
one idea would be to enclose your whole string within single quotes and then
have double quotes within that. like:
dialog[2] = 'Who was the 16th President of The United States of
America?<br><a href="javascript:correct()" ...'
another way i've solved this in the past is to set a variable equal to q or
something like that.
q = '"'; // that's a double quote within single quotes
then, write the string using + q + where a quote would be:
"...<a href=" + q + "javascript:correct()" + q + " onMouseOver=" + q + "..."
hope that makes sense,
-rebecca
http://www.nerdygirl.com
-----Original Message-----
From: Alan Greiner [mailto:greiner(at)gowrie.k12.ia.us]
Sent: Tuesday, January 18, 2000 2:04 PM
To: 'Hwg-Techniques'
Subject:
I am coding a javascript that breaks several statements into parts of an
array:
var dialog=new Array()
dialog[0]="<center>Are you ready to see how much you know.</center>"
dialog[1]="<center>Question number 1</center>"
dialog[2]="Who was the 16th President of The United States of America?<br><a
href='javascript:correct()' onMouseOver='window.status='Click on an
Answer!';return true;'>1.Abraham Lincoln</a><br><a
href='javascript:incorrect()'>2.Calvin Coolidge</a><br><a
href='javascript:incorrect()'>3.Ulysess S. Grant</a>"
dialog[2] is all on one line
Here is the problem: the hyperlinks don't work in netscape because I am not
using a double quote - I can't because is messes up the array and I need a
third way (type of quote) to deal with my onMouseOver quotes.
TIA
Alan Greiner greiner(at)gowrie.k12.ia.us
515-352-3351 - office
515-386-3774 - home
HWG hwg-techniques mailing list archives,
maintained by Webmasters @ IWA
This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.