1
I would like to call a function when a user selects one of the entries in a XoopsFormSelect gadget. How is this done? I don't see anything in the api to do this but I know it must be possible. I also tried:
$sites_select = new XoopsFormSelect("","sites");
$sites_tray = new XoopsFormElementTray(_MM_SITE, " ");
$sites_tray->addElement($sites_select);
$sites_select->addOption("","");
fill the $sites_select gadget from a DB select call ....
$site_select->setExtra("onchange='doSite()'");
Then:
function doSite() {
echo "Called doSite()";
}
This didn't work, my browser went blank and won't render anything on my form. Comment out the "setExtra()" line and form renders ok.
Thanks
Doug P