just in case... I leave the isJSON method that I'm using because I
don't remember my prototype version :)
function isJSON() {
var str = this;
if (str.blank()) return false;
str = this.replace(/\\./g, '@').replace(/"[^"\\\n\r]*"/g, '');
return (/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(str);
}
On 10 mar, 16:40, diegoturriaga <[email protected]> wrote:
> Well (first that all sorry for my english;)
> When I do:
>
> var aux = "aula";
> if (aux.isJSON()) {
> $('msg').value = "ERROR";}
>
> else {
> $('msg').value = "OK";
>
> }
>
> returns ERROR!!!
>
> Any Ideas?
--
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en.