85
rated 0 times
[
87]
[
2]
/ answers: 1 / hits: 21771
/ 13 Years ago, wed, july 13, 2011, 12:00:00
I am trying to pass a parameter to an iFrame by adding a param in the onload event as below:
<iframe name=myframe src=http://test.com/hello onload= frames['myframe'].location.href='http://test.com/hello?uname='+getUserName();>
</iframe>
(getUserName is my custom function)
But the iFrame keeps loading over and over again. How do I stop this using just javascript (and not any js framework)?
Note:For certain reasons, I can write only inline javascript scripts.
More From » iframe