I am displaying some 3rd party banners inside an Iframe which are loading through javascript. Banners are showing inside iframe and links are openning to new window when I browse the url myself. Problem is when I am trying to advertise the url to different ptc sites. Basically this site show url inside iframe. so when my url which is itself an iframe loading inside another iframe, clicking not working. Below is my current code
<base target="_blank"> //in head section
<iframe sandbox="allow-same-origin allow-scripts allow-forms allow-popups allow-downloads" src="<?php echo $_SESSION['ad_url'];?>" frameborder="0" id="pgl" name="pgl" style="overflow:hidden;height:100%;width:100%" height="100%" width="100%" onmouseover="on_mouseover(this)" onmouseout="on_mouseout(this)"></iframe>
As i see the source of the page that embeds my iframe found below code
<iframe sandbox="allow-same-origin allow-scripts allow-forms" id="surfsite" name="surfsite" src="https://sitename.com/sitename.php?" width="100%" height="100%" frameborder="0" scrolling="yes"></iframe>
how can I make this working
Related
My WordPress WebSite Posts has different type of iframe tags:
eg:
<iframe src="http://examplesite1.tld/somepageordirectory"></iframe>
<iframe src="http://examplesite2.tld/somepageordirectory"></iframe>
<iframe src="http://examplesite3.tld/somepageordirectory"></iframe>
<iframe src="http://examplesite4.tld/somepageordirectory"></iframe>
I Need WordPress Function for get and replace iframe src for specified (eg: examplesite3.tld) domain eg:
<iframe src="http://examplesite1.tld/somepageordirectory"></iframe>
<iframe src="http://examplesite2.tld/somepageordirectory"></iframe>
<iframe src="/embed.php?ref=http://examplesite3.tld/somepageordirectory"></iframe>
<iframe src="http://examplesite4.tld/somepageordirectory"></iframe>
I'm new in WordPress.
Any Help is Highly appreciated and a lot of sorry about my english.
We need the surrounding code to understand how the page is built, not the displayed code.
To do what you're talking about you would use the surrounding html tags and echo the wordpress variable within it, eg:
<iframe src="<?php echo wp_function( 'variable' );?>"></iframe>
<div class="grid-5-12">
<iframe width="200" height="120" src="http://www.saweb.info/videos/nightclub.mp4" frameborder="0"></iframe>
</div>
I copied above direct from an "admin page" from Firefox developer page source and it works as standalone, but on the admin page itself it doesn't appear (it always did)
It also doesn't show even without the div. (It's in a parsley form and the iframe show the "current selected video")
Tested in Chrome and it also doesn't display while I can't find any similar error on the internet.
Anyone perhaps has an idea why the iframe don't appear / disappeared please?
is not used for play videos but to display another page. Some browsers might support this way of importing a video. But correct way to use tag like this for your video link.
<video width="200" height="120" controls>
<source src="http://www.saweb.info/videos/nightclub.mp4" type="video/mp4">
</video>
I want to use Google vrview-web using this example: googlevrview
How can I set src attribute in iframe tag?
Below is the example given in the link:
<iframe width="100%" scrolling="yes" allowfullscreen src="https://storage.googleapis.com/vrview/examples/video/index.html?video=examples/video/congo_2048.mp4&is_stereo=true"></iframe>
Now I have to set my video URL in src like below:
<iframe width="100%" scrolling="yes" allowfullscreen src="<?php echo VIDEO_URL.$data["video"]; ?>&is_stereo=true"></iframe>
It does not display the video.
if I use below iframe tag:
<iframe width="100%" scrolling="yes" allowfullscreen src="https://storage.googleapis.com/vrview/examples/video/index.html?video=MY_VIDEO&is_stereo=true"></iframe>
Still, it prints this data in my page:
Output
Assuming that the VIDEO_URL hold this:
https://storage.googleapis.com/vrview/examples/video/index.html?video=
Your iframe can't just print the HTML. Please inspect your rendered HTML/DOM or iframe src value is proper and not broken.
Moreover it is required that your website, where the videos are, allows CORS. Cross origin resource sharing. Otherwise the Google's script won't load your video inside the iframe in VR mode.
How would i take a sub id from a destination url and have it dynamically inserted into an iframe code before the page or iframe is loaded?
I want to add the subid to be able to track conversions from adsense without having a thankyou/goal page since the iframe stays on the same page.
this is the code i have at the end of my destination url
&subid=campaignname_{keyword}
this is the iframe code where i want the subid to dynamically insert before loading
<iframe border="0" frameborder="0" width="680" height="800" src="http://xxxxxxx.com?PublisherSubID=</iframe>
If I understand correctly, you have a page http://xxxxxx.com?subid=12345 and you want to take the subid and drop it into the url of your iframe source.
Try this:
<iframe border="0" frameborder="0" width="680" height="800" src="<iframe border="0" frameborder="0" width="680" height="800" src="http://xxxxxxx.com?PublisherSubID=<?php echo $_GET['subid']; ?>"></iframe>
This will take the subid from the $_GET array of your page and drop it into the source url of your iframe.
This will also include the "campaignname_" text as well. if you want to strip that out, then instead of $_GET['subid'] use str_replace("campaignname_","",$_GET['subid']);
is there a method to open src link without iframe?
i have a script with this code:
<td><a target="_blank" style="margin-right:3px;" href="download/id/<?=$dl['id']?>"><?=$dl['title']?></a></td>
when a user clicks, it open the link using the following code:
<iframe onLoad="calcHeight();" scrolling="yes" frameborder="1" width="100%" height="2000" name="resize" id="resize" src="<?=$download['url'] ?>" />
how can i allow the link top open in a full page without iframe src when a user click on?
Instead of rendering a page containing an <iframe> with the target site, you could simply redirect the user to the target URL:
<?php
header('Location: '.$download['url']); ?>
Note: There must be no other output sent to the browser before the header()