amitye
12-10-2009, 10:39 AM
I am trying to run javascript within Iframe and its not running.
(The bigger picture:
The final target is to do a file upload without refreshing the page, and the original code is using the iframe as the target of the form, and the return from the server is a javascript code that should update some status field on the page.
However the code return from the server is not running, so I just paste it in the iframe and it is still not running.
)
Content-type: text/html\n\n
<html>
<script type="text/javascript">
alert("this is running")
</script>
<iframe id="upload_target" name="upload_target" src="#" style="width:100;height:100;border:0px solid #fff;">
<script type="text/javascript">
alert("this not running")
</script>
</iframe>
</html>
(The bigger picture:
The final target is to do a file upload without refreshing the page, and the original code is using the iframe as the target of the form, and the return from the server is a javascript code that should update some status field on the page.
However the code return from the server is not running, so I just paste it in the iframe and it is still not running.
)
Content-type: text/html\n\n
<html>
<script type="text/javascript">
alert("this is running")
</script>
<iframe id="upload_target" name="upload_target" src="#" style="width:100;height:100;border:0px solid #fff;">
<script type="text/javascript">
alert("this not running")
</script>
</iframe>
</html>