Document.write function how to escape parametars
I have line like this and the onLoad function parameters are reporting error:
The part that bothers me is
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>' ");
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 ?
OK, this is scenario. I want to host a script on my server and just give end users something like:
and what that script does is creates iframe, fill it etc...
Now I find this justifiable reason to do document write, right ? ...so how about a bit help on this.... is this doable at all ?
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread