JackM Posted December 1, 2006 Posted December 1, 2006 HelloI'm trying very hard to figure out how to execute javascript code on a webpage after it has loaded. Apple has a method called stringByEvaluatingJavaScriptFromString to do this in there WebKit but I cannot find anything like it for MSHTML.Please help
jaws75 Posted December 1, 2006 Posted December 1, 2006 (edited) Two options.In the body tag put onload="function.to.be.called"eg.<body onload="doit()">or at the end of the document before the closing html tag use window.onload(bla.bla.bla)try searching onload for more info.good luckedit: sorry I misunderstood the question Edited December 1, 2006 by jaws75
JackM Posted December 1, 2006 Author Posted December 1, 2006 Hmm but I want to execute it AFTER it has loaded when i choose to. So i can't embed it into the html code itself...
LLXX Posted December 2, 2006 Posted December 2, 2006 Hmm but I want to execute it AFTER it has loaded when i choose to. So i can't embed it into the html code itself...Put script tags at the very bottom of the HTML.
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now