RockyCode

10 results for technology, javascript...

Submitting a form from an a href link using jquery

posted by Ted on 20 Jul 2010

Okay, Okay, I admit it. I'm javascript challanged. As a Java developer, I've looked down my nose at paltry javascript, treating it as a "me-too" technology trying to cash in on the hype surrounding java all these years.
As a result, I've missed out on a lot of js goodies. And, with javascript entering a renaissance of sorts, combined with the wildfire-like buzz surrounding libraries such as jquery, it's high time I learn some.

JQuery and MarkLogic Mashup for Photo Gallery

posted by Steve on 13 May 2010

I've been fooling around with a thumbnail gallery that pulls up either an associated video or image. Here is how I got the workings to work.

Caching Ajax Requests in IE

posted by Jake on 08 Apr 2010

Have you ever had a problem with ajax requests caching in Internet Explorer. I have, and recently I came across a nicer solution than I have traditionally used. In the past, I have used a unique parameter on the url to keep IE from caching previous requests to the same url, like so:

Access JS object fields

posted by Jake on 18 Dec 2009

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.

Unexpected call to method or property access

posted by Jake on 18 Dec 2009

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

posted by Jake on 15 Sep 2009

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

posted by Jake on 09 Sep 2009

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:

Pass Parameters to Jquery Event Functions

posted by Jake on 08 Sep 2009

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.

Id's from JSF, used in jQuery

posted by Jake on 22 Nov 2008

For our view layer on our current project at work, we use JSF/Facelets + some jQuery goodness. I have found that at some times these two tech's have a hard time working with each other. I ocassionally have problems with the id's. Here's a nice little way to guarantee you id's are awesome.

ManyToMany Relationships in JSF

posted by Jake on 22 Sep 2008

What a journey of discovery! I haven't done much many-to-many relationship management in JSF. Django makes it quite easy. But at work recently, I did it in JSF. It was quite the experience, hereafter chronicled.