There are two data items that must be placed on the InfoBus in order to execute the query: the parameter to the query and the query trigger. The query is executed by the JDBCSource applet (defined later) only when the query trigger goes from false to true. So the first step of the script is to reset the query trigger before placing both data items on the InfoBus.
<SCRIPT LANGUAGE="JavaScript">
// Two data items are placed on the InfoBus in order to execute the query: // the parameter to the query and the query trigger. // The query is executed by the JDBCSource applet (defined below) only when // the query trigger goes from false to true. Thus, we first reset the query // trigger before placing both data items on the InfoBus. function run_query() { var i = document.forms[0].elements[0].selectedIndex; document.ScriptHelper.publishStringToInfoBus("shoeQueryResult_trigger","false"); document.ScriptHelper.publishStringToInfoBus("state",document.forms[0].elements[0].options[i].value); document.ScriptHelper.publishStringToInfoBus("shoeQueryResult_trigger","true"); }
</SCRIPT>