This works fine, however I have now 2 other problems: I put some javascript to reload the page when a table is selected in the drop down list
- When I'm usung the "
function block__custom_javascripts()" routine, it seems that the function I define in an external *.js file is unknown (at least this is what Firebug says) when it gets executed in the
block__before_left_column() function. Strange...
- When I echo the javascript function directly in the
block__before_left_column() routine, then the function is known, but I don't succeed in getting any value (I have "undefined" in the javascript alert)
Here is the code I have in ApplicationDelegate.php:
- Code: Select all
class conf_ApplicationDelegate {
function block__before_left_column(){
echo "<script type=\"text/javascript\">
function tableLoad(y){
alert(y.value);
}
</script>";
$app =& Dataface_Application::getInstance();
$tables =& $app->_conf['_tables'];
echo '<select name="ddl" onChange="tableLoad(this.value)">';
foreach ( $tables as $name=>$label){
echo '<option value="'.$name.'">'.$label.'</option>';
}
echo '</select>';
}
/* function block__custom_javascripts(){
echo '<script src="javascripts.js" type="text/javascript" language="javascript"></script>';
}
*/
}