[Javascript] referring to a form in a div
Rodney Myers
rmyers at i-way.co.uk
Wed May 2 09:43:09 CDT 2001
(Re post)
This script is intended to find a form at any depth of layers in
Netscape.
Of limited usefulness as it stands, but I consider it a stepping stone
towards being able to manipulate data from and/or document forms within
Netscape layers.
Any holes spotted? Suggestions?
<script LANGUAGE='javascript'>
function hasForm(wd){ // For Netscape
var ret=false;
if(wd.forms.length>0){return(true);}
else if(wd.layers.length>0)
{
for(var i=0;i<wd.layers.length;i++)
{
ret=hasForm(wd.layers[i].document);
if(ret){break;}
}
}
return(ret);
}
</script>
Peter Brunone wrote:
>
> Let me rephrase that.
>
> I tried it, and it didn't work. The same error just keeps popping up,
> that document.layers.queryInputDiv.selectForm has no properties.
--
Shop at ssistant Add-ons and Developer Workshops
http://www.aflyingstart.net/addons/
Enquiries regarding Shop at ssistant Classic training :
Call 01256 880770
Rodney Myers
Based in Oxford, England
Technical Director, Shop at ssistant eCommerce Solutions
More information about the Javascript
mailing list