createMenu(sel){
document.write("TEST1");
}
createFirstMenu(sel){
document.write("TEST2");
}
I have another page that includes this javaScript. In this page I use <body
onload="createMenu('sel1');">:
<body onload="createMenu('sel1')">
<form name="sels" method="post" action="?page=jubii">
Kategori:
<select name="sel1" id="sel1" onchange="createMenu('sel1','sel2');">
</select>
<select name="sel2" id="sel2">
<option value="" selected
-er- Vælg --</option>
</select>
<input name="search" type="text" id="search">
<input type="submit" name="Submit" value="Søg">
</form>
"TEST1" get printed when I open this page as expected.
But if I change onload to:
<body onload="createFirstMenu('sel1')">
I don't get "TEST2" printed!
What are the explanation?