Q:

Set the background image on mouse over

I want to set the background image of a button dynamically. (not using CSS classes).
I tried to achieve this by setting the style.backgroundImage property of the button as shown below. getOnMouseOverImage is bound to the onmouseover event and the button is passed as this.
myapp.ui.Button.prototype.getOnMouseOverImage = function(event) {
    event.target.style.backgroundImage = "url( \'" + myapp.core.ImageStore.getInstance().getImageURL(this.buttonId) + "\')'"
    event.preventDefault();
    event.stopPropagation();
    }

The above code doesn't seem to change the backgroundImage property of the button. How do I achieve this?

A:

It looks to me like you have an extra '
event.target.style.backgroundImage = "url( \'" + myapp.core.ImageStore.getInstance().getImageURL(this.buttonId) + "\')**'**"

I believe it should look like this
 event.target.style.backgroundImage = "url( \'" + myapp.core.ImageStore.getInstance().getImageURL(this.buttonId) + "\')"

No sure if that's the problem, however since I can't comment I'm going to post this as an answer.
EDIT: in fact, I'm not even sure you need the apostrophe's
 event.target.style.backgroundImage = "url(" + myapp.core.ImageStore.getInstance().getImageURL(this.buttonId) + ")"

