How to Hide empty div file if no url in the iframe?How to horizontally center a <div>?How to apply CSS to iframe?How to make div not larger than its contents?How to align content of a div to the bottom?How do I modify the URL without reloading the page?Use jQuery to hide a DIV when the user clicks outside of itHow to make a div 100% height of the browser window?How to overlay one div over another divHow do I auto-resize an image to fit a 'div' container?Cannot display HTML string
Why doesn't a particle exert force on itself?
Trying to understand a summation
Is it possible to do moon sighting in advance for 5 years with 100% accuracy?
What will Doctor Strange protect now?
How is it believable that Euron could so easily pull off this ambush?
Two (probably) equal real numbers which are not proved to be equal?
Add elements inside Array conditionally in JavaScript
Is this strange Morse signal type common?
logo selection for poster presentation
Align a table column at a specific symbol
And now you see it II (the B side)
Opposite party turned away from voting when ballot is all opposing party
Is it a good idea to copy a trader when investing?
Visual Studio Code download existing code
Creating Stored Procedure in local db that references tables in linked server
Can you turn music upside down?
why it is 2>&1 and not 2>>&1 to append to a log file
What should I use to get rid of some kind of weed in my onions
Why doesn't Dany protect her dragons better?
Is it safe to keep the GPU on 100% utilization for a very long time?
I'm attempting to understand my 401k match and how much I need to contribute to maximize the match
What is the oldest instrument ever?
Exactly which act of bravery are Luke and Han awarded a medal for?
As a small race with a heavy weapon, does enlage remove the disadvantage?
How to Hide empty div file if no url in the iframe?
How to horizontally center a <div>?How to apply CSS to iframe?How to make div not larger than its contents?How to align content of a div to the bottom?How do I modify the URL without reloading the page?Use jQuery to hide a DIV when the user clicks outside of itHow to make a div 100% height of the browser window?How to overlay one div over another divHow do I auto-resize an image to fit a 'div' container?Cannot display HTML string
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
Quick Question, How to hide this code in php: if there is nothing to show or no link in "src" or unknown?
The problem is, Hence the <div class="resp-container">
in .css have padding-top: 56.25%;
. All of the box have padding even the iframe is empty.
I hope my explanation is clear to you guys and I'm sorry if its a bit hard to explain.
To understand what I mean here is my current webpage that have a problem: https://donpramis.com/timeline/
<div class="resp-container">
<iframe class="resp-iframe" src=(unknown) frameborder="0" sandbox="allow-same-origin allow-scripts" allowfullscreen="allowfullscreen"></iframe>
</div>
Here is the complete code:
<div class="container">
<h3 align="center"><a href="">Timeline (Beta)</a></a></h3><br />
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">My Journey</h3>
</div>
<div class="panel-body timeline-body">
<div class="timeline">
<div class="timeline__wrap">
<div class="timeline__items">
<?php
foreach($result as $row)
?>
<div class="timeline__item">
<div class="timeline__content">
<h2><?php echo $row["year"]; ?></h2>
<p><?php echo $row["comment"];?></p>
<p><a href="<?php echo $row["website"];?>"><?php echo $row["Site_Description"];?></a></p>
<div id="resp-container">
<iframe class="resp-iframe" src="<?php echo $row["iframe_video"];?>" frameborder="0" sandbox="allow-same-origin allow-scripts" allowfullscreen="allowfullscreen"></iframe>
</div>
<img class="img-responsive" src="<?php echo $row["timelime_image"];?>" alt="" />
</div>
</div>
<?php
?>
</div>
</div>
</div>
</div>
</div>
</div>
php html iframe
add a comment |
Quick Question, How to hide this code in php: if there is nothing to show or no link in "src" or unknown?
The problem is, Hence the <div class="resp-container">
in .css have padding-top: 56.25%;
. All of the box have padding even the iframe is empty.
I hope my explanation is clear to you guys and I'm sorry if its a bit hard to explain.
To understand what I mean here is my current webpage that have a problem: https://donpramis.com/timeline/
<div class="resp-container">
<iframe class="resp-iframe" src=(unknown) frameborder="0" sandbox="allow-same-origin allow-scripts" allowfullscreen="allowfullscreen"></iframe>
</div>
Here is the complete code:
<div class="container">
<h3 align="center"><a href="">Timeline (Beta)</a></a></h3><br />
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">My Journey</h3>
</div>
<div class="panel-body timeline-body">
<div class="timeline">
<div class="timeline__wrap">
<div class="timeline__items">
<?php
foreach($result as $row)
?>
<div class="timeline__item">
<div class="timeline__content">
<h2><?php echo $row["year"]; ?></h2>
<p><?php echo $row["comment"];?></p>
<p><a href="<?php echo $row["website"];?>"><?php echo $row["Site_Description"];?></a></p>
<div id="resp-container">
<iframe class="resp-iframe" src="<?php echo $row["iframe_video"];?>" frameborder="0" sandbox="allow-same-origin allow-scripts" allowfullscreen="allowfullscreen"></iframe>
</div>
<img class="img-responsive" src="<?php echo $row["timelime_image"];?>" alt="" />
</div>
</div>
<?php
?>
</div>
</div>
</div>
</div>
</div>
</div>
php html iframe
if you want to hide this code in php then please show your php code first
– M.Hemant
Mar 23 at 7:55
@M.Hemant here is the complete code... I just remove the html,head,header, and footer.
– dk-pramis
Mar 23 at 8:04
add a comment |
Quick Question, How to hide this code in php: if there is nothing to show or no link in "src" or unknown?
The problem is, Hence the <div class="resp-container">
in .css have padding-top: 56.25%;
. All of the box have padding even the iframe is empty.
I hope my explanation is clear to you guys and I'm sorry if its a bit hard to explain.
To understand what I mean here is my current webpage that have a problem: https://donpramis.com/timeline/
<div class="resp-container">
<iframe class="resp-iframe" src=(unknown) frameborder="0" sandbox="allow-same-origin allow-scripts" allowfullscreen="allowfullscreen"></iframe>
</div>
Here is the complete code:
<div class="container">
<h3 align="center"><a href="">Timeline (Beta)</a></a></h3><br />
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">My Journey</h3>
</div>
<div class="panel-body timeline-body">
<div class="timeline">
<div class="timeline__wrap">
<div class="timeline__items">
<?php
foreach($result as $row)
?>
<div class="timeline__item">
<div class="timeline__content">
<h2><?php echo $row["year"]; ?></h2>
<p><?php echo $row["comment"];?></p>
<p><a href="<?php echo $row["website"];?>"><?php echo $row["Site_Description"];?></a></p>
<div id="resp-container">
<iframe class="resp-iframe" src="<?php echo $row["iframe_video"];?>" frameborder="0" sandbox="allow-same-origin allow-scripts" allowfullscreen="allowfullscreen"></iframe>
</div>
<img class="img-responsive" src="<?php echo $row["timelime_image"];?>" alt="" />
</div>
</div>
<?php
?>
</div>
</div>
</div>
</div>
</div>
</div>
php html iframe
Quick Question, How to hide this code in php: if there is nothing to show or no link in "src" or unknown?
The problem is, Hence the <div class="resp-container">
in .css have padding-top: 56.25%;
. All of the box have padding even the iframe is empty.
I hope my explanation is clear to you guys and I'm sorry if its a bit hard to explain.
To understand what I mean here is my current webpage that have a problem: https://donpramis.com/timeline/
<div class="resp-container">
<iframe class="resp-iframe" src=(unknown) frameborder="0" sandbox="allow-same-origin allow-scripts" allowfullscreen="allowfullscreen"></iframe>
</div>
Here is the complete code:
<div class="container">
<h3 align="center"><a href="">Timeline (Beta)</a></a></h3><br />
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">My Journey</h3>
</div>
<div class="panel-body timeline-body">
<div class="timeline">
<div class="timeline__wrap">
<div class="timeline__items">
<?php
foreach($result as $row)
?>
<div class="timeline__item">
<div class="timeline__content">
<h2><?php echo $row["year"]; ?></h2>
<p><?php echo $row["comment"];?></p>
<p><a href="<?php echo $row["website"];?>"><?php echo $row["Site_Description"];?></a></p>
<div id="resp-container">
<iframe class="resp-iframe" src="<?php echo $row["iframe_video"];?>" frameborder="0" sandbox="allow-same-origin allow-scripts" allowfullscreen="allowfullscreen"></iframe>
</div>
<img class="img-responsive" src="<?php echo $row["timelime_image"];?>" alt="" />
</div>
</div>
<?php
?>
</div>
</div>
</div>
</div>
</div>
</div>
php html iframe
php html iframe
edited Mar 23 at 16:51
dk-pramis
asked Mar 23 at 7:49
dk-pramisdk-pramis
105
105
if you want to hide this code in php then please show your php code first
– M.Hemant
Mar 23 at 7:55
@M.Hemant here is the complete code... I just remove the html,head,header, and footer.
– dk-pramis
Mar 23 at 8:04
add a comment |
if you want to hide this code in php then please show your php code first
– M.Hemant
Mar 23 at 7:55
@M.Hemant here is the complete code... I just remove the html,head,header, and footer.
– dk-pramis
Mar 23 at 8:04
if you want to hide this code in php then please show your php code first
– M.Hemant
Mar 23 at 7:55
if you want to hide this code in php then please show your php code first
– M.Hemant
Mar 23 at 7:55
@M.Hemant here is the complete code... I just remove the html,head,header, and footer.
– dk-pramis
Mar 23 at 8:04
@M.Hemant here is the complete code... I just remove the html,head,header, and footer.
– dk-pramis
Mar 23 at 8:04
add a comment |
3 Answers
3
active
oldest
votes
You can add the Div with iframe after checking the value for src. For example:
<?php if($row['iframe_video']!='' && $row['iframe_video']!='unknown') echo '<div id="resp-container">
<iframe class="resp-iframe" src="'. $row["iframe_video"].'" frameborder="0" sandbox="allow-same-origin allow-scripts" allowfullscreen="allowfullscreen"></iframe>
</div>'; ?>
@CourseWeb - Thank you... its working with your code...
– dk-pramis
Mar 23 at 16:52
add a comment |
Use jQuery to check for the content inside the Iframe. If content does not exist, use hide() to hide the resp-container;
if(!$("#iframeid").contents().find("body").length)
$('.resp-container').hide();
add a comment |
You first need to validate the data.
for validating you can use empty check if(empty($row["iframe_video"])
function.
here the code.
<div id="resp-container">
<?php if (empty($row["iframe_video"]) || $row["iframe_video"] != 'unknown'): ?>
<iframe class="resp-iframe" src="<?php echo $row["iframe_video"];?>" frameborder="0" sandbox="allow-same-origin allow-scripts" allowfullscreen="allowfullscreen"></iframe>
<?php endif ?>
</div>
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55311740%2fhow-to-hide-empty-div-file-if-no-url-in-the-iframe%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
You can add the Div with iframe after checking the value for src. For example:
<?php if($row['iframe_video']!='' && $row['iframe_video']!='unknown') echo '<div id="resp-container">
<iframe class="resp-iframe" src="'. $row["iframe_video"].'" frameborder="0" sandbox="allow-same-origin allow-scripts" allowfullscreen="allowfullscreen"></iframe>
</div>'; ?>
@CourseWeb - Thank you... its working with your code...
– dk-pramis
Mar 23 at 16:52
add a comment |
You can add the Div with iframe after checking the value for src. For example:
<?php if($row['iframe_video']!='' && $row['iframe_video']!='unknown') echo '<div id="resp-container">
<iframe class="resp-iframe" src="'. $row["iframe_video"].'" frameborder="0" sandbox="allow-same-origin allow-scripts" allowfullscreen="allowfullscreen"></iframe>
</div>'; ?>
@CourseWeb - Thank you... its working with your code...
– dk-pramis
Mar 23 at 16:52
add a comment |
You can add the Div with iframe after checking the value for src. For example:
<?php if($row['iframe_video']!='' && $row['iframe_video']!='unknown') echo '<div id="resp-container">
<iframe class="resp-iframe" src="'. $row["iframe_video"].'" frameborder="0" sandbox="allow-same-origin allow-scripts" allowfullscreen="allowfullscreen"></iframe>
</div>'; ?>
You can add the Div with iframe after checking the value for src. For example:
<?php if($row['iframe_video']!='' && $row['iframe_video']!='unknown') echo '<div id="resp-container">
<iframe class="resp-iframe" src="'. $row["iframe_video"].'" frameborder="0" sandbox="allow-same-origin allow-scripts" allowfullscreen="allowfullscreen"></iframe>
</div>'; ?>
answered Mar 23 at 8:19
CoursesWebCoursesWeb
3,38931522
3,38931522
@CourseWeb - Thank you... its working with your code...
– dk-pramis
Mar 23 at 16:52
add a comment |
@CourseWeb - Thank you... its working with your code...
– dk-pramis
Mar 23 at 16:52
@CourseWeb - Thank you... its working with your code...
– dk-pramis
Mar 23 at 16:52
@CourseWeb - Thank you... its working with your code...
– dk-pramis
Mar 23 at 16:52
add a comment |
Use jQuery to check for the content inside the Iframe. If content does not exist, use hide() to hide the resp-container;
if(!$("#iframeid").contents().find("body").length)
$('.resp-container').hide();
add a comment |
Use jQuery to check for the content inside the Iframe. If content does not exist, use hide() to hide the resp-container;
if(!$("#iframeid").contents().find("body").length)
$('.resp-container').hide();
add a comment |
Use jQuery to check for the content inside the Iframe. If content does not exist, use hide() to hide the resp-container;
if(!$("#iframeid").contents().find("body").length)
$('.resp-container').hide();
Use jQuery to check for the content inside the Iframe. If content does not exist, use hide() to hide the resp-container;
if(!$("#iframeid").contents().find("body").length)
$('.resp-container').hide();
answered Mar 23 at 8:21
akshithDayanandakshithDayanand
323212
323212
add a comment |
add a comment |
You first need to validate the data.
for validating you can use empty check if(empty($row["iframe_video"])
function.
here the code.
<div id="resp-container">
<?php if (empty($row["iframe_video"]) || $row["iframe_video"] != 'unknown'): ?>
<iframe class="resp-iframe" src="<?php echo $row["iframe_video"];?>" frameborder="0" sandbox="allow-same-origin allow-scripts" allowfullscreen="allowfullscreen"></iframe>
<?php endif ?>
</div>
add a comment |
You first need to validate the data.
for validating you can use empty check if(empty($row["iframe_video"])
function.
here the code.
<div id="resp-container">
<?php if (empty($row["iframe_video"]) || $row["iframe_video"] != 'unknown'): ?>
<iframe class="resp-iframe" src="<?php echo $row["iframe_video"];?>" frameborder="0" sandbox="allow-same-origin allow-scripts" allowfullscreen="allowfullscreen"></iframe>
<?php endif ?>
</div>
add a comment |
You first need to validate the data.
for validating you can use empty check if(empty($row["iframe_video"])
function.
here the code.
<div id="resp-container">
<?php if (empty($row["iframe_video"]) || $row["iframe_video"] != 'unknown'): ?>
<iframe class="resp-iframe" src="<?php echo $row["iframe_video"];?>" frameborder="0" sandbox="allow-same-origin allow-scripts" allowfullscreen="allowfullscreen"></iframe>
<?php endif ?>
</div>
You first need to validate the data.
for validating you can use empty check if(empty($row["iframe_video"])
function.
here the code.
<div id="resp-container">
<?php if (empty($row["iframe_video"]) || $row["iframe_video"] != 'unknown'): ?>
<iframe class="resp-iframe" src="<?php echo $row["iframe_video"];?>" frameborder="0" sandbox="allow-same-origin allow-scripts" allowfullscreen="allowfullscreen"></iframe>
<?php endif ?>
</div>
answered Mar 23 at 11:20
Karan SadanaKaran Sadana
41126
41126
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55311740%2fhow-to-hide-empty-div-file-if-no-url-in-the-iframe%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
if you want to hide this code in php then please show your php code first
– M.Hemant
Mar 23 at 7:55
@M.Hemant here is the complete code... I just remove the html,head,header, and footer.
– dk-pramis
Mar 23 at 8:04