Hi guys,
I have line like this and the onLoad function parameters are reporting error:
Code:
document.write("document.getElementById(\"my_iframe\").innerHTML = '<iframe src=\"http://MyDomain.com/index.php?accessing_from=\'+loc+\'\" style=\"border: none; min-height: 60px;\" onload=\"resizeCrossDomainIframe(\'iframe\', \'http://MyDomain.com\');\"> </iframe>'  ");
The part that bothers me is
Code:
onload=\"resizeCrossDomainIframe(\'iframe\', \'http://MyDomain.com\');\"
I get error with this setup but when I remove function parameters and leave it like resizeCrossDomainIframe() everything works OK (in terms of document writing, but function is not working as it's not passing parameters), so my question is why this won't work when parameters are escaped ?