D
DL
Hi,
I'm having a problem with iframe reload upon data saving with ie7
(tested on XP) or ie8 (tested on windows 7).
The flow of the page is:
a) automatically saving/updating data inside the iframe while a user
is typing... (no problem with Firefox 3.5.x or IE7/8)
b) upon clicking on the Save button, manually save/update and refresh
the screen including reloading the iframe (no problem with Firefox but
the iframe fails to resize per js instruction)
More detail of the problem (I've omitted the automatic data saving
part for not cluttering the screen but will post more code if
necessary)
js within header
----------------
function setFrm() {
var fh = document.getElementById('tb');
fh.style.width = (screen.width * 0.85)+"px";
fh.style.height = (screen.height - 350)+"px";
}
if (navigator.appCodeName == 'Mozilla') {
var Editor1 = document.getElementById('tb').contentWindow.document;
}
else
var Editor1 = document.frames['tb'].document;
html body
---------
<body bgcolor="##ECECFF" onload="setFrm();">
<form...>
<iframe id="tb" name="tb" src="getData.html"
onload="document.frames['tb'].document.designMode='on';"
contenteditable="true"></iframe>
<input type="hidden" id="nt" name="nt"/>
<input name="SaveEditing" type="submit" value=" Save " onclick=<cfif
CGI.HTTP_USER_AGENT contains "MSIE">"var Editor1 =
document.frames['tb'].document;var nt =
document.getElementById('nt');nt.value =
Editor1.body.innerHTML;"<cfelse>"var Editor1 =
document.getElementById('textbox').contentWindow.document;var nt =
document.getElementById('nt');nt.value = Editor1.body.innerHTML;"</
cfif> style="background-color:##BDD3FF;color:black">
</form>
Thanks in advance.
I'm having a problem with iframe reload upon data saving with ie7
(tested on XP) or ie8 (tested on windows 7).
The flow of the page is:
a) automatically saving/updating data inside the iframe while a user
is typing... (no problem with Firefox 3.5.x or IE7/8)
b) upon clicking on the Save button, manually save/update and refresh
the screen including reloading the iframe (no problem with Firefox but
the iframe fails to resize per js instruction)
More detail of the problem (I've omitted the automatic data saving
part for not cluttering the screen but will post more code if
necessary)
js within header
----------------
function setFrm() {
var fh = document.getElementById('tb');
fh.style.width = (screen.width * 0.85)+"px";
fh.style.height = (screen.height - 350)+"px";
}
if (navigator.appCodeName == 'Mozilla') {
var Editor1 = document.getElementById('tb').contentWindow.document;
}
else
var Editor1 = document.frames['tb'].document;
html body
---------
<body bgcolor="##ECECFF" onload="setFrm();">
<form...>
<iframe id="tb" name="tb" src="getData.html"
onload="document.frames['tb'].document.designMode='on';"
contenteditable="true"></iframe>
<input type="hidden" id="nt" name="nt"/>
<input name="SaveEditing" type="submit" value=" Save " onclick=<cfif
CGI.HTTP_USER_AGENT contains "MSIE">"var Editor1 =
document.frames['tb'].document;var nt =
document.getElementById('nt');nt.value =
Editor1.body.innerHTML;"<cfelse>"var Editor1 =
document.getElementById('textbox').contentWindow.document;var nt =
document.getElementById('nt');nt.value = Editor1.body.innerHTML;"</
cfif> style="background-color:##BDD3FF;color:black">
</form>
Thanks in advance.