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