Results 1 to 3 of 3
-
27th Sep 2011, 10:46 PM #1OPMember
HTML - iframe help
Hope you can help me with this.
I have a 3rd party website that I want to show a snippet of on MY website using iframe. Simple right?
No.
It seems that this 3rd party website has a tiny piece of javascript:
Code:<script type="text/javascript"> <!-- if (top.location != self.location) { top.location = self.location.href } //--> </script>
Is there a way to prevent this? and just keep the 3rd party website inside the iframe?
ThanksAshleyuk1984 Reviewed by Ashleyuk1984 on . HTML - iframe help Hope you can help me with this. I have a 3rd party website that I want to show a snippet of on MY website using iframe. Simple right? No. It seems that this 3rd party website has a tiny piece of javascript: <script type="text/javascript"> <!-- if (top.location != self.location) { top.location = self.location.href } //--> </script> Rating: 5
UltraIMG - Free Image Hosting
Want to ask me anything to do with UltraIMG?? Send me a PM.
Chances are that if you leave a message on the forum I might not see it. :)
-
31st Dec 2011, 06:49 AM #2Member
i think you wanna place ifames for url shortening sites in your website or something similar
basically this line here
<script type="text/javascript"> <!-- if (top.location != self.location) { top.location = self.location.href } //--> </script>
so this can not be done, cuz you can not modify javascript of 3rd party website so do not waste your time
-
31st Dec 2011, 07:12 AM #3Respected MemberWebsite's:
DL4Everything.com Soft2050.inWell! You can try out to actually modify the iframe source before it is shown to user. Just wrote a sample code which does the work:
PHP Code:<html>
<head><title>Test</title></head>
<body>
<script type="text/javascript">
function Removejsfromifram(frameid) {
var capturediframe = document.getElementById(frameid);
capturediframe.contentWindow.document.body.innerHTML = capturediframe.contentWindow.document.body.innerHTML.replace('<script.*?type="text/javascript".*?>.*?<\/script>', '');
// Remove Javascript from Iframe using javascript - Soft2050
}
</script>
<body>
<iframe id="softid" src="test - Copy.html" onload="Removejsfromifram('softid')" ></iframe>
</body>
</html>
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
[Need Help] IFrame Plugin
By Villa in forum WordpressReplies: 1Last Post: 12th Apr 2012, 08:47 AM -
WTS: iFrame Traffic
By ebizzz in forum Traffic Market (Buy, Sell and Trade)Replies: 3Last Post: 6th Mar 2012, 12:34 PM -
[Buying] Traffic iFrame/Pop up/Bux
By EnCiPh3r in forum Completed TransactionsReplies: 5Last Post: 22nd Oct 2011, 05:40 PM -
Trojoan.Html.Iframe.I [Guide and help]
By sunnyx12x21x in forum General DiscussionReplies: 0Last Post: 14th Oct 2010, 04:58 PM -
(X)HTML, CSS slicing (6 years experience) | PSD to (X)HTML and CSS | Professional job
By Wamer in forum Completed TransactionsReplies: 8Last Post: 21st Jul 2010, 06:13 PM
themaLeecher - leech and manage...
Version 5.03 released. Open older version (or...