setting the target of a form in an iframe or nested frames in Opera7
Posted on 2003-11-06
I need to set an inputfield as well as the target of a form, which is placed in an iframe. This iframe, is yet in another normal frame. Now, I need a code which would be something like:
top.frame[x].iframe[x].document.form[x].element[x].value = value;
top.frame[x].iframe[x].document.form[x].target = target;
I'd rather work not with an iframe at all, but I have to, since Opera7 seems to have bug that you cannot nest normal frames within normal frames and then target them, i.e. (IE5+ and NS7+ do not seem to have that problem. This code above works for these browsers):
elementId = "username";
formId = "loginform"
thisObj = eval("top.level1.level2.document.getElementById('"+elementId+"')");
thisObj.value = "valueOfElement";
thisObj = eval("top.level1.level2.document.getElementById('"+formId+"')");
thisObj.target = "targetFrame";
So, does anyone know how to target the target of a form in an iframe in a frame ..... , or even better .....
know how to target nested frames in Opera7?