Forum Moderators: open
I'm doing a WYSIWYG editor and using a iFrame for it. I want to fill the body of the iFrame with some data when the page is loaded.
Here's my Javascript:
function Init()
{
myiFrame.document.designMode = 'On';
var t='Hola campeones';
alert(t);
myiFrame.document.body.innerHTML = t;
}
My question is why this doesn't work when I take out the "alert(t)" statement?
Thanx in advance...
function Init()
{
myiFrame.document.designMode = 'On';
setTimeout("Init2()",100);
}
function Init2()
{
var t='Hola campeones';
myiFrame.document.body.innerHTML = t;
}
It's really great! Hope you have a nice day!