Menu
I have several functions in func.js file. In my main file I call <script type=”text/javascript” src=”func.js”></script>
One of the functions is triggered in onClick of a button.
This is the button:
<input type=”button” name=”dispatch” value=”Test” onclick=”test();”>
func.js contains:
[code=php]
function test() {
alert(‘test’);
}
This works on IE6, NS4.7, NS7, but NOT Opera 6.0.4. Opera simply does not call the function (no alert).
Oddly, if I put test() in the top of the HTML (instead of the .js), it works. It also then calls the other functions in .js.
Does anyone have an idea why Opera is doing this?