Friday, March 4, 2011

I am passsing an xhtml tag ID in onPageLoad('TableID') function.

Javascripts are in script.js file which I have called in the xhtml file.

But it is throwing error at line where I have calling onpageload function saying " object expected.

However, if I have the scripts on same XHTML file, it is working fine.

From stackoverflow
  • As specified in HTML4 specifications for Scripts, do you declare your external javascript like this ?

    <script src="external.js" type="text/javascript"></script>
    

    IE (but other browers may too) requires that you open and close the script tag.
    The end tag of the `script' element is not optional

  • make sure you call your scripts after the page is fully loaded - use document.onload event handler or

    <body onload="">
    

0 comments:

Post a Comment