|
-
Oct 4th, 2000, 01:32 PM
#1
Thread Starter
Fanatic Member
hey,
I am just curious......
I am writing to the status bar and would like to use a
single quote like "joe's coffee"
but when I do, javascript sees the single quote in joe's name and gets confused about [s coffee].
here is my code
*********************
<a href="" onMouseover="(document.bgColor='#333333'); (window.status='joe's coffe') ; return true ;" onMouseout="(document.bgColor='#cccccc'); (window.status=''); ")>Boo</a>
**********************
if this is possible let me know how.
if not no biggie.
if I confused you let me know and I'll try and re-word my question.
thanks
-
Oct 4th, 2000, 08:21 PM
#2
Hyperactive Member
Try using "\q" in your string where you want the double quotes.
"People who think they know everything are a great annoyance to those of us who do."
-
Oct 5th, 2000, 07:16 AM
#3
That doesn't work.. 
You have to escape the quotes themselves:
Code:
<SCRIPT LANGUAGE="JavaScript">
window.status="\"hello\"";
</SCRIPT>
You do the same for single quotes:
Code:
<SCRIPT LANGUAGE="JavaScript">
window.status='Joe\'s Coffee';
</SCRIPT>
-
Oct 5th, 2000, 09:21 AM
#4
Thread Starter
Fanatic Member
super cool
thanks, I'm gonna use that right now.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|