> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, October 08, 2003 8:04 AM
> To: [EMAIL PROTECTED]
> Subject: / /OREF:CPT0486D Calling up Action events via Javascript
>
>
> Hi,
>
> Is it possible to invoke portlet Action events using
> onchange="" attribute of html form element such as <select/>?
> So, instead of a submit button with a name
> "eventSubmit_do[Action]", I wish to use the onchange event of
> <select/> element.
What I do is to create an invisible submit button like this:
<input type="submit" name="eventSubmit_doUpdate" value=""
style="display:none"/>
And then use a javascript function to click that button like this:
function mySubmit(formName, submitName)
{
var myForm = document.forms[formName];
if(myForm != null) myForm.elements[submitName].click();
}
Not the most elegant way, probably, but it works. I got the idea from a
portlet shipped with Jetspeed, but I can't remember which one.
Cheers,
Holger
--
Holger Dewes
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]