I have been reading to stay away from JavaScript for a lot of things, however I was messing around with it and it doesnt seem to work (unless I am blind and have missed something)
<SCRIPT LANGUAGE="text/javascript">
function testResults() {
System.out.println("Got into function");
}
</SCRIPT>
And this is my body:
<form action="" method="GET">
<input type="button" value="Save" name="saveType" style="margin:10px;" onClick="testResults()"/>
</form>
From what I have seen of javascipt this should be fine…
Any suggestions?
to get it work use this instead:
Look here – jsfiddle
it is
type="text/javascriptand notlanguage="text/language"also in javascript you have to usealert().