I have a form with two iframes,one at the top and other below it.I want to disable the form inside the bottom iframe through javascript.I tried using getelementbyid of the form but returns undefined error message.Able to access the iframe but the form is not recognised.Can anyone help me with this
function wCONTENTS (TAGname){ var tag=0;
tag =document.getElementById(TAGname); if (! tag)return(0);
return((tag.contentDocument?tag.contentDocument:eval('window.document.'+TAGname+'.document')));
return (0);}
To submit or other thngs
function sFORM (iframeNAME,formNAME){
var myIFRAME =wCONTENTS(iframeNAME);if(! myIFRAME )return(false);
var f12 =myIFRAME .getElementById(formNAME);
if(f12)f12.submit(); // or whatever else
return(false);}
Knowledge is that which can be shown to be the case, and Intelligence is the method one uses to deploy the demonstration of what is the case, everything else is Information.
Bookmarks