Hi all,
I load a html site into the radhtmlplaceholder which contains JS Function that I have to call to initialize the Html page. How do i know when the js functions are completely loaded and ready for use?
When i call them to early, the browser raises an exception which gets shown to the user and that is not really nice.
I call the JS in my Loaded Html page with the following method
var serializedContext = JsonConvert.SerializeObject(dtoPoolPartyContext);
string code = String.Format("document.getElementById('myIFrame').contentWindow.App.setContext({0});", serializedContext);
try
{
var output = HtmlPage.Window.Eval(code);
}
Does someone have a suggestion how to achieve that?
I think of the following workarounds,
-Poll the site for a special tag in the dom, so then i know when it's ready
-Set the frontend to a defined sleeptime (5 seconds or so) which is really ugly
Cheers
Pascal
I load a html site into the radhtmlplaceholder which contains JS Function that I have to call to initialize the Html page. How do i know when the js functions are completely loaded and ready for use?
When i call them to early, the browser raises an exception which gets shown to the user and that is not really nice.
I call the JS in my Loaded Html page with the following method
var serializedContext = JsonConvert.SerializeObject(dtoPoolPartyContext);
string code = String.Format("document.getElementById('myIFrame').contentWindow.App.setContext({0});", serializedContext);
try
{
var output = HtmlPage.Window.Eval(code);
}
Does someone have a suggestion how to achieve that?
I think of the following workarounds,
-Poll the site for a special tag in the dom, so then i know when it's ready
-Set the frontend to a defined sleeptime (5 seconds or so) which is really ugly
Cheers
Pascal