Source Code from Iframe (same domain)
Hi I would like to view the source code from an iframe using Jquery (same domains) in an alert and also place it inside a text area.
I am currently using the following code:
- <script>
- alert($('#myIframe').contents().find('html').html());
- document.searchform.txtarea.value=$('#myIframe').contents().find('html').html();
- </script>
The code works perfectly for Internet Explorer but does not work for Chrome. Also it only works on my local computer but doesnt actually work at all for IE or chrome when i upload it to my web server. Any ideas?
Thanks,
Rav