GIMME wrote:
Is there a way to confirm that a string has valid Javascript syntax?
Either a client side or server side solution would be ok.
For a client side solution I'd like to confirm that, say :
var a = "function foo { var t='ok'; alert(t); }"
is valid, or for a server side solution that
String a = "function foo { var t='ok'; alert(t); }"
Neither is client-side or server-side.
The first vaguely resembles JavaScript, and the second vaguely resembles
Java.
Each has both client-side and server-side forms.
But does your crosspost mean that you really are looking for a solution
in either language?
Stewart.
--
My e-mail is valid but not my primary mailbox, aside from its being the
unfortunate victim of intensive mail-bombing at the moment. Please keep
replies on the 'group where everyone may benefit.