Entries from May 2007

Monday, May 21st, 2007

Focusing first form element on page load with prototype

All in one line thanks to prototype Event.observe(window, 'load', function(){Form.focusFirstElement('yourFormId');}, false); Bookmark to:

Wednesday, May 16th, 2007

Using Protototype AJAX & JSON with J2EE and Struts

We don't always get to use the latest greatest web framework, but just because you're using a crusty old dinosaur J2EE XML framework from the pits of hell, doesn't mean you can't make girls cry with your AJAX/JSON skills. This tutorial will show how to use prototype to return JSON data to your jsp. Bookmark [...]

Friday, May 4th, 2007

Clearing All Text Boxes with Prototype

Here's a quick one, clearing out all input text boxes with prototype $('formid').getInputs('text').invoke('clear'); Bookmark to: