开发者

Get Function not implemented error when using ssi's and using window.onload

I get an error message Error Message: Not implemented When doing this and using this statement in a server side include.

window.onload=readInSubsystemInformationFromFile();

It works however if I click ok button on that error message, its just annoying that this error message pops up.

So my question to you is, are there a function that checks if readInSubsystemInformationFromFile() has been initialized? If so do this me开发者_JAVA百科thod (In other words it shall be of the type onLoad) If not, then wait until it is ready.

Thanks in advance =)


To check if the function has been defined yet:

if(typeof readInSubsystemInformationFromFile == 'function'){
    // Exists
    readInSubsystemInformationFromFile();
}

Also, try jQuery for it's onload method... Works in pretty much all browsers and works well. It's a hard thing to get right.

$(document).ready(function(){
    // Your code here
});

http://api.jquery.com/ready/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜