I'm currently working on a project that requires the use of a complex form, i.e. nested replicating containers, so I turned on the navigation tree for enhanced usability. Unfortunately this caused another usability issue: the width of the tree frame minimizes the form viewing area forcing users to scroll horizontally.
So I wrote the following code for resizing the tree navigation frame and the form frame. Put the function in your userscript and call it when the form first loads. Change the iframe widths accordingly... Note this has only been tested with tst 6.1 and IE 6.
function resizeNav() {
if (parent.datacapture.isDatacaptureLoaded) {
var iframes = parent.window.document.getElementsByTagName("iframe");
for (n=0; n<iframes.length; n++){
if (iframes.name == "treeFrame") {
iframes.width = "100";
iframes.marginwidth = "0";
}
if (iframes.name == "formframe") {
iframes.width = "900";
}
}
}
else {
setTimeout("resizeNav()",500);
}
return(true);
}