Tag 'javascript'...
Access JS object fields
Sometimes it is useful to be able to iterate through the fields in a javascript object and use the values kept therein for something spectacular. I've found this to be the case for POJSOs (+S = 'Script') that I pass down to the client with new-found data from the backend.
Read full article...Unexpected call to method or property access
In a recent admin tool I was creating, I was using SOUIT of Javascript... apparently more than I knew how to write well. Eventually, it all worked wonderfully -- that is, until someone tried to use it in a lesser browser -- Internet Explorer. The error was thus:
Remove Whitespace in Html with Javascript
Lots of websites give you the ability to copy certain pieces of text/code/something off their website in a "copy to clipboard"-type functionality. In the process of creating just such a function on a little page I was making, I wanted to make the html that was copied very tight and compact. The most annoying things were the whitespace and the newlines. Here's some javascript to strip out the whitespace between xml/html tags.
Pass Parameters to Javascript Callback
Callback functions are a nice feature of Javascript. It's nice to be able to just use a function handle to show that it should be called when a certain something completes. Sometimes, however, we want to do more than just specify a function handle. We want to pass parameters. Why? Because sometimes the callback method cares about other data that was available before the original request. Here's an example:
Read full article...Pass Parameters to Jquery Event Functions
Jquery has some awesome event-handling abilities. The elusive ability to pass parameters into these event callbacks seems way harder than it should be. Nevertheless, I have found *a* solution. I really doubt it's the best one. I really hope it isn't.
Read full article...

