GlennCarter
11-27-2003, 05:50 AM
Hi,
This is going to seem a really stupid question but I'm a newb to Javascript so please bear with me.
I'm looking for a function that puts in a character from the ascii value - something like: Chr(No) in VBScript. The specific charactor I wish to insert is speechmarks " . To this end I wrote a little function that I thought would do it however it keeps returning the error: Object doesn't support this property or method.
The code is thus:
function insSpeechMarks() {
var SpStr = String.fromcharcode(34) ;
return SpStr;
}
I appreciate there's probably a much simpler way of doing this so if anyone could tell me that then that would be a great help as an alternative to telling me why my code is wrong.
This is going to seem a really stupid question but I'm a newb to Javascript so please bear with me.
I'm looking for a function that puts in a character from the ascii value - something like: Chr(No) in VBScript. The specific charactor I wish to insert is speechmarks " . To this end I wrote a little function that I thought would do it however it keeps returning the error: Object doesn't support this property or method.
The code is thus:
function insSpeechMarks() {
var SpStr = String.fromcharcode(34) ;
return SpStr;
}
I appreciate there's probably a much simpler way of doing this so if anyone could tell me that then that would be a great help as an alternative to telling me why my code is wrong.