Help with JavaScript - I'm going blind! (Full Version)

All Forums >> [Web Development] >> General Web Development



Message


abbeyvet -> Help with JavaScript - I'm going blind! (3/14/2001 20:03:00)

My eyes are turning to mush trying to find the error in this JavaScript. The message I get is

An error has occured etc....
Line 33
Character 184
Expected';'

But it's there!! I am going blind looking for the lost semi colon - can anyone see where it is wrong?
www.aislinn.ie/thought.htm

------------------
Katherine

InKK Design
LinKKs - Kilkenny's Online Magazine


-*-*-*-*-*-*-*-*-*-*
"Dogs have owners, cats have staff!"

[This message has been edited by abbeyvet (edited 03-14-2001).]





Dixiedi -> RE: Help with JavaScript - I'm going blind! (3/14/2001 15:51:00)

I know this sounds really stupid, but it really did happen to me.

Highlight and remove the ; then replace it.

I swear, I spent a couple of hours looking at the darn thing when the error message kept telling me it wasn't there.

Don't know how or why, but I completely removed it. Typed it back into position and all was well.

Go figure. That's the only time I had that problem, and I really hope it never happens again!





Shirley -> RE: Help with JavaScript - I'm going blind! (3/14/2001 19:30:00)

I had the same thing happen to me. I took the js out and put it back in and it worked.

------------------
Shirley

GET OVER IT

Money Tree Systems





Gil -> RE: Help with JavaScript - I'm going blind! (3/14/2001 21:05:00)

Don't ask - I haven't a clue. But this has worked for me in the past:

Cut the script from the body of the document:

<script>
writeTip();
</script>

Save the page'

Close whatever editor you're using,

Reopen the editor,

type
<script>
writeTip();
</script>

Resave....


Good luck

------------------
Gil Harvey
The Host Factory
Resellers are our speciality





Guest -> RE: Help with JavaScript - I'm going blind! (3/15/2001 20:14:00)

You're not blind or crazy, but you DID make the number one error with quotes - nesting them without using the \ character.

The problem is in MSG[9] - you have embedded quotes, which confuses the rest of the script.

Replace the line with
msg[9] = "<p>A musician must make music<br>An artist must paint<br>A poet must write<br>If he is ultimately to be at peace with himself<br>What a man can do - he must be</p><p class=\"sml\">Albert Maslow</p>";

(The change I made was to put \ in front of the quotes in front of Albert Maslow)...

Enjoy
-Gene

PS: Beleive it or not, I came here to LEARN javascript - I've never done it before... But code is code is code





Dixiedi -> RE: Help with JavaScript - I'm going blind! (3/15/2001 20:41:00)

Well DONE! Geneage,
I am embarrassed to admit I didn't even go look at the code. I made a wrong assumption and (hopefully didn't) had somebody deleting and typing for nothing.

Well Done!

class="sml" in Message 9 should be class='sml'





abbeyvet -> RE: Help with JavaScript - I'm going blind! (3/15/2001 23:49:00)

Thank you! Thank you! Thank you! Geneage - that was it!! You have saved my sight!!

I didn't even need to escape them - just delete them! I am always careful to escape characters in text but old habits die hard and I inadvertantly put them in in the tag.





Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.046875