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;








0















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>











share|improve this question
























  • 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


















0















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>











share|improve this question
























  • 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














0












0








0








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>











share|improve this question
















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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


















  • 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













3 Answers
3






active

oldest

votes


















0














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>'; ?>





share|improve this answer























  • @CourseWeb - Thank you... its working with your code...

    – dk-pramis
    Mar 23 at 16:52


















0














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();







share|improve this answer






























    0














    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>





    share|improve this answer























      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
      );



      );













      draft saved

      draft discarded


















      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









      0














      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>'; ?>





      share|improve this answer























      • @CourseWeb - Thank you... its working with your code...

        – dk-pramis
        Mar 23 at 16:52















      0














      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>'; ?>





      share|improve this answer























      • @CourseWeb - Thank you... its working with your code...

        – dk-pramis
        Mar 23 at 16:52













      0












      0








      0







      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>'; ?>





      share|improve this answer













      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>'; ?>






      share|improve this answer












      share|improve this answer



      share|improve this answer










      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

















      • @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













      0














      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();







      share|improve this answer



























        0














        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();







        share|improve this answer

























          0












          0








          0







          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();







          share|improve this answer













          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();








          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 23 at 8:21









          akshithDayanandakshithDayanand

          323212




          323212





















              0














              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>





              share|improve this answer



























                0














                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>





                share|improve this answer

























                  0












                  0








                  0







                  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>





                  share|improve this answer













                  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>






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Mar 23 at 11:20









                  Karan SadanaKaran Sadana

                  41126




                  41126



























                      draft saved

                      draft discarded
















































                      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.




                      draft saved


                      draft discarded














                      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





















































                      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







                      Popular posts from this blog

                      Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                      Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

                      Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript