Get updates

Archive for February, 2008

Scott Extending JavaScript Strings with Chomp using Prototypes

Chomp is that oh-so-fun function in Perl to bite off extra newlines from the end of a string. It can be useful to have chomp for JavaScript too, especially in cases such as reading input in textareas.

This time around, I’m going to take a quick look at how we can take the standalone JavaScript chomp function and make it even more accessible by extending JavaScript’s String object, which also gives us an excuse to try out the awesome prototype feature in JavaScript.

Continue Reading…

3DM Design is where Scott Drake publishes thoughts on programming web applications in JavaScript and Ruby.

Fatal error: Uncaught Error: Call to undefined function ereg_replace() in /home/dmetro/ Stack trace: #0 /home/dmetro/ akpc_is_searcher() #1 /home/dmetro/ akpc_api_footer_javascript('') #2 /home/dmetro/ WP_Hook->apply_filters(NULL, Array) #3 /home/dmetro/ WP_Hook->do_action(Array) #4 /home/dmetro/ do_action('wp_footer') #5 /home/dmetro/ wp_footer() #6 /home/dmetro/ require_once('/home/dmetro/3d...') #7 /home/dmetro/ load_template('/home/dmetro/3d...', true) #8 /home/dmetro/ locate_t in /home/dmetro/ on line 2531