hi I been trying to get my web page to work with an externally referenced script. Here is a part of the page:
<script src="combobox.js">
var ComboBox;
function bodyOnload1()
{
<!-- cbJSMainFunc() is found in combobox.js-->
ComboBox = new cbJSMainFunc("ComboBoxID", "cbGID");
}
var temp = new bodyOnload1();
</script>
when I try to use the function bodyOnload1() upon OnLoad event they tell me "Object expected"
<body onload = "bodyOnload1();" >
I have tried creating an object with above function but the web page cant dected the variable(undefined error).
<body onload = "temp.bodyOnload1();" >
Can anyone help?
<script src="combobox.js">
var ComboBox;
function bodyOnload1()
{
<!-- cbJSMainFunc() is found in combobox.js-->
ComboBox = new cbJSMainFunc("ComboBoxID", "cbGID");
}
var temp = new bodyOnload1();
</script>
when I try to use the function bodyOnload1() upon OnLoad event they tell me "Object expected"
<body onload = "bodyOnload1();" >
I have tried creating an object with above function but the web page cant dected the variable(undefined error).
<body onload = "temp.bodyOnload1();" >
Can anyone help?

Comment