|
|||||
|
|
#1 |
|
|
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 = do***ent.all ? 1 : 0; var NS4 = do***ent.layers ? 1 : 0; var DOM = (!IE4 && do***ent.getElementById) ? 1 : 0; function wlayer(name,html){ var out; if(NS4){ out = do***ent.layers[name]; out.do***ent.open(); out.do***ent.write(html); out.do***ent.close(); } else if(IE4){ out = do***ent.frames ? do***ent.frames[name] : do***ent.all[name]; out.innerHTML=html; } else if(DOM){ out = do***ent.getElementById(name); out.innerHTML=html; } } /////////////////////////////////////// This code seems well able to write lumps of HTML into the do***ent 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 -- Robin Becker |
|
|
#2 |
|
|
> The code that does the writing looks like > /////////////////////////////////////// > var IE4 = do***ent.all ? 1 : 0; > var NS4 = do***ent.layers ? 1 : 0; > var DOM = (!IE4 && do***ent.getElementById) ? 1 : 0; > > function wlayer(name,html){ > var out; > if(NS4){ > out = do***ent.layers[name]; > out.do***ent.open(); > out.do***ent.write(html); > out.do***ent.close(); > } > else if(IE4){ > out = do***ent.frames ? do***ent.frames[name] : do***ent.all[name]; > out.innerHTML=html; > } > else if(DOM){ > out = do***ent.getElementById(name); > out.innerHTML=html; > } > } Why don't you try the DOM path by putting the DOM test before the IE4 test? Doesn't your code in IE5 and IE6 take the IE4 path because do***ent.all still exists? Robert |
|
|
#3 |
|
|
wrote: > 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. [snipped nasty script] I suggest you read: <URL:http://jibbering.com/faq/#FAQ4_26> and its links. > This code seems well able to write lumps of HTML into the do***ent > 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. Also read: <URL:http://jibbering.com/faq/#FAQ4_15> and its links. Mike -- Michael Winter M.Winter@blueyonder.co.invalid (replace ".invalid" with ".uk" to reply) |