var urlname= '/a/b.php?company_name='+company_name+'&series='+series;
document.getElementById('frame2').innerHTML='<IFRAME HEIGHT="600px" WIDTH="100%" NORESIZE="NORESIZE" SRC="'+urlname+'" NAME="aol" FRAMEBORDER="0" ALIGN="ABSBOTTOM" scrolling="no" id="a1" name="a1" onload="Javascript:heights('a1')"></IFRAME>';
I’m using this code but the function heights() is not running and it’s not showing any error too. What’s the right syntax to call a function with arguments in JavaScript. I’m new to it so don’t have much idea. Any help would be highly appreciated.
Where is the heights function located?
You need to escape the most inner quotes and remove “javascript:”, eg replace
onload="Javascript:heights('a1')"withonload="heights(\'a1\')"