R
Robin Becker
I'm trying to fix a problem in IE 5.2 javascript on mac OS 10.2.
Basically the problem is that we're writing dynamic form elements and these
don't seem to be recognized by the form.
The code that does the writing looks like
///////////////////////////////////////
var IE4 = document.all ? 1 : 0;
var NS4 = document.layers ? 1 : 0;
var DOM = (!IE4 && document.getElementById) ? 1 : 0;
function wlayer(name,html){
var out;
if(NS4){
out = document.layers[name];
out.document.open();
out.document.write(html);
out.document.close();
}
else if(IE4){
out = document.frames ? document.frames[name] : document.all[name];
out.innerHTML=html;
}
else if(DOM){
out = document.getElementById(name);
out.innerHTML=html;
}
}
///////////////////////////////////////
This code seems well able to write lumps of HTML into the document
at specified div's etc etc and the appearance of the page changes.
Any <a tags> in the dynamically changed section seem to work.
However, if the written html contains for variables eg
<input type="checkbox" name="cb0"> then the form into which the
html is written doesn't seem to see the new inputs.
This code works well in IE5,6 Mozilla etc so what does Mac IE 5 need me
to do?
Robin Becker
Basically the problem is that we're writing dynamic form elements and these
don't seem to be recognized by the form.
The code that does the writing looks like
///////////////////////////////////////
var IE4 = document.all ? 1 : 0;
var NS4 = document.layers ? 1 : 0;
var DOM = (!IE4 && document.getElementById) ? 1 : 0;
function wlayer(name,html){
var out;
if(NS4){
out = document.layers[name];
out.document.open();
out.document.write(html);
out.document.close();
}
else if(IE4){
out = document.frames ? document.frames[name] : document.all[name];
out.innerHTML=html;
}
else if(DOM){
out = document.getElementById(name);
out.innerHTML=html;
}
}
///////////////////////////////////////
This code seems well able to write lumps of HTML into the document
at specified div's etc etc and the appearance of the page changes.
Any <a tags> in the dynamically changed section seem to work.
However, if the written html contains for variables eg
<input type="checkbox" name="cb0"> then the form into which the
html is written doesn't seem to see the new inputs.
This code works well in IE5,6 Mozilla etc so what does Mac IE 5 need me
to do?
Robin Becker