06-24-2002, 07:21 AM
I keep getting a script error when I enter a string like this
quotes='This is what I\'m trying to say'
Why doesn't this work? Every webpage I've seen says this works, but I get a script error every time.
06-24-2002, 09:35 AM
damm, there was supposed to be a backslash in the string, right before the single quote. The board must have parsed it out.
06-24-2002, 08:11 PM
why not just go between quotes and double quotes like so
quotes = "This is what I'm trying to say"
make sure you have your language parameter, set " \' " should work. next time just post your code. :thumbsup:
06-25-2002, 02:16 AM
Are you getting this error when you're displaying the information on a page, or when you're writing it to a database?
There are easy solutions for both situations!
06-25-2002, 03:01 AM
I'm getting this problem when writing to a div marker within a webpage. I'll paste the entire code below. The problem is that block of quotes assignments. When I put either single quote within a double quote assignment like
quotes="He's a dog." or when I use a single quote within a single quote assignment, like this
quotes='He\'s a dog." I get a script error. If I remove the single quote, it works fine.
var timerID = null
var timerRunning = false
var delay = 1000
var quotes=new Array()
quotes='everything is purple.'
quotes='we kill Jesus again.'
quotes='the chickens inherit the Earth.'
quotes='it turns out the Jews were right.'
quotes='the lotto numbers are 21 5 3 25 33 17.'
quotes='dogs WILL play poker.'
quotes='Reubeeeeen ****s a like, totally cantankerous bovine carny.'
quotes='Cheez-Itz is people.'
quotes='iguanas are everywhere.'
quotes='Sony owns everybodys reproductive organs.'
quotes='America finally kicks Canadas ***.'
quotes='\"smell ya later\" does indeed replace \"Goodbye\".'
function writetoLyr(id, message)
else if (document.all)
document.getElementById(id).innerHTML = message;
// Set the length of the timer, in seconds
secs = 4
timerRunning = false
//self.status = secs
secs = secs - 1
timerRunning = true
timerID = self.setTimeout("StartTheTimer()", delay)
strength=(which==0)? 1 : 0.2
else if (cur.filters)