Javascript


#1

I want to add some converters to my site and am wondering if javascript will do what I want. There will be lots of boolean analysis and string manipulation. (Things like “if there’s a vowel that isn’t followed by another vowel or an n or an r, then add a space after that vowel.”)

I’ve looked around the Web but haven’t seen programming advice on this particular approach. Can javascript can handle this? Any book or website recommendations for learning this programming language?


#2

For javascript try one of the O’Reilly books Dynamic HTML or Javascript: the Definitive Guide. Dynamic HTML is a more gentle introduction.

I’m not sure I understand your project entirely, but since javascript supports regular expressions, it should be able to handle any string manipulation that you throw at it.

Having said that, I strongly recommend that you use PHP or perl instead. Javascript is fiddly and it forces you to combine your content and your code, which is a bad idea for most projects.