Why am I not able to get this javascript code to work in a hotspot?

I have a simple, gray HTML button on a web form. It triggers some javascript field validations and works well. I’d like to replace the button with a nice graphical image from another application. When I paste the graphical button on the form, highlight it, create hotspot and add the JS code to the OnClick event, it does nothing when clicked. I’ve even tried a simple javascript alert message in the hotspot, but I can’t get that to work either.

Here’s the HTML code:

//Save as Draft button (see Computed Value for hide/when conditions)

<INPUT TYPE=button class = submit onClick="document.forms[0].ApprovalStatus.value = ‘Draft’;

document.forms[0].ButtonClicked.value = ‘Save as Draft’;if( validate() == false ); return false;" VALUE=“Save as Draft”>

Here’s what I put in the hotspot onclick event:

document.forms[0].ApprovalStatus.value = ‘Draft’;

document.forms[0].ButtonClicked.value = ‘Save as Draft’;if( validate() == false ); return false;" VALUE=“Save as Draft”;

And this doesn’t work either:

alert(“Hello”);

I have Generate HTML for all fields and Use Javascript when generating pages checked.

Thanks very much for any ideas. I know this should be simple and I’ll feel dumb when the problem is pointed out to me.

Russ

Subject: Problem found - code was in “Client” (Notes) onClick event, not Web.

When you add javascript code to the onClick event, if you don’t pay close attention you will be adding it to the Notes Client. There is a drop down box labeled, “Run” that needs to be changed to Web if you want the code to run in a web client.