javascript - If element ID found in iframe within parent page do something -
i have 1 single iframe within parent page on same domain. need when id 'applications' found in iframe trigger changes in parent page. javascript function correct ?
function load(){ if (window.frames[0].document.getelementbyid('applications')) { var str=document.getelementbyid("tst").innerhtml; var n=str.replace("login","delogare"); document.getelementbyid("tst").innerhtml=n; document.getelementbyid('tst').title ='logout'; document.getelementbyid('tst').href='logout'; document.getelementbyid('prt').href='../profil/cont.html?refresh'; }}
Comments
Post a Comment