www.webdeveloper.com
Results 1 to 8 of 8

Thread: content not loading within the div tag

Hybrid View

  1. #1
    Join Date
    Jul 2012
    Posts
    6

    Thumbs down content not loading within the div tag

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">

    <head>
    <title>Paul Sorvino Foods Products</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="description" content="Paul Sorvino Foods Product offering page. This page shows all of t oe products offered by Paul Sorvino Foods." />
    <link rel="stylesheet" type="text/css" href="style.css" />
    </head>
    <body>
    <div id="masthead">
    <center>
    <h3 class="normal">Product Listing</h3>
    </center>
    </div>
    <div id="top_nav" >
    <a href="index.htm" target="_top">PSF HOME</a>&nbsp;&nbsp;&nbsp;&nbsp;
    <a href="SauSpec.htm" target="_top">SAUSAGE PACKAGING SPECS</a>&nbsp;&nbsp;
    <a href="contact_us.htm" target="_top">INFORMATION REQUEST</a>&nbsp;&nbsp;
    <a href="Sausage_2.ppt" target="_top">SAUSAGE MARKETING PPT</a>
    </div>
    <div id="container" ">
    <div id= "left_col" >
    <center>
    <h6>Gourmet <i>Pork Sausage</i></h6>
    </center>
    <ul>
    <li><a href="pdb_reading11.php">Gourmet Broccoli Rabe &amp; Romano Cheese Pork Sausage</a></li>
    <li><a href="GarlicHerb_1.htm">Gourmet Garlic, Herb &amp; Sun Dried Tomato Pork Sausage</a></li>
    <li><a href="SweetItalian_1.htm">Gourmet Sweet Italian Style Pork Sausage</a></li>
    <li><a href="HotItalian_1.htm">Gourmet Hot Italian Style Pork Sausage</a></li>
    </ul>
    <center>
    <h6><i>Seafood Items</i></h6>
    </center>
    <ul>
    <li><a href="JumboLumpCrabCakes_1.htm">Gourmet Maryland Style Jumbo Lump Crab Cakes</a></li>
    <li><a href="SauteShrimp-1.htm">Premium Wild American Sautéing Shrimp</a></li>
    <li><a href="StuffedShrimp_1.htm">Premium Wild American Shrimp Stuffed with Jumbo Lump Crabmeat</a></li>
    </ul>
    </div>
    <div id="page_content">
    <p>This is my page content</p>
    </div>
    </div>
    <div id="footer">

    </div>

    </body>

    </html>

  2. #2
    Join Date
    Jul 2012
    Posts
    32

    Cool Re:

    Please Include The CSS File, I Do not have A Problem Loading it Right Now, (i also took away the
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     <html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
    and just made it <html>)

  3. #3
    Join Date
    Jul 2012
    Posts
    6
    iGeekiHackiMatt here is the css code

    Code:
    #masthead {border-bottom:3px #FF0000 solid;}
    #top_nav {border-bottom: 3px #FF0000 solid; height:25px; padding:5px;}
    #container {position: relative;width: 100%; border-bottom:3px ##FF0000 solid;}
    #left_col {border-right: 2px #FF0000 solid; width: 200px; position: absolute; left: 0px; top: 0px;}
    #page_content {margin-left: 200px;}
    #footer {width: 100%;}
    body {color: #FF0000; background-color: #000000}
    a {color: #FFFFFF;}
    a:visited {color: #FF0000;}
    a:hover {color: #008000;font-size: 120%;}
    h1 {font-size: 350%}
    h2 {font-size: 330%}
    h3.normal {font-size: 310%}
    h3.fancy{font-size:310%; font-family:Old English Text MT}
    h4 {font-size:250%}
    h4.fancy {font-size:250%; font-family:Old English Text MT}
    h5 {font-size:150%}
    h6 {font-size:110%}

  4. #4
    Join Date
    Jul 2012
    Posts
    32

    Sorry, If This doesn't help

    Okay, it seemed To Still Work fine, I saw that you said something AJAX So I Tested It And It Seems To Work good As Well.... I Did Find A Type O Here
    Code:
    <div id="container" ">
    When As I am Sure you Know it should be
    Code:
    <div id="container">
    here is the full code
    Code:
    <html>
     <head>
     <title>Paul Sorvino Foods Products</title>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     <meta name="description" content="Paul Sorvino Foods Product offering page. This page shows all of t oe products offered by Paul Sorvino Foods." />
     <style>
     #masthead {border-bottom:3px #FF0000 solid;}
    #top_nav {border-bottom: 3px #FF0000 solid; height:25px; padding:5px;}
    #container {position: relative;width: 100%; border-bottom:3px ##FF0000 solid;}
    #left_col {border-right: 2px #FF0000 solid; width: 200px; position: absolute; left: 0px; top: 0px; padding-right: 4px;}
    #page_content {margin-left: 208px;}
    #footer {width: 100%;}
    body {color: #FF0000; background-color: #000000}
    a {color: #FFFFFF;}
    a:visited {color: #FF0000;}
    a:hover {color: #008000;font-size: 120%;}
    h1 {font-size: 350%}
    h2 {font-size: 330%}
    h3.normal {font-size: 310%}
    h3.fancy{font-size:310%; font-family:Old English Text MT}
    h4 {font-size:250%}
    h4.fancy {font-size:250%; font-family:Old English Text MT}
    h5 {font-size:150%}
    h6 {font-size:110%}
     </style>
     <script type="text/javascript">
    function loadXMLDoc()
    {
    var xmlhttp;
    if (window.XMLHttpRequest)
      {// code for IE7+, Firefox, Chrome, Opera, Safari
      xmlhttp=new XMLHttpRequest();
      }
    else
      {// code for IE6, IE5
      xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    xmlhttp.onreadystatechange=function()
      {
      if (xmlhttp.readyState==4 && xmlhttp.status==200)
        {
        document.getElementById("page_content").innerHTML=xmlhttp.responseText;
        }
      }
    xmlhttp.open("GET","TEST.txt",true);
    xmlhttp.send();
    }
    </script>
     </head>
     <body>
     <div id="masthead">
     <center>
     <h3 class="normal">Product Listing</h3>
     </center>
     </div>
     <div id="top_nav" align="center">
     <a href="index.htm" target="_top">PSF HOME</a>&nbsp;&nbsp;&nbsp;&nbsp;
     <a href="SauSpec.htm" target="_top">SAUSAGE PACKAGING SPECS</a>&nbsp;&nbsp;
     <a href="contact_us.htm" target="_top">INFORMATION REQUEST</a>&nbsp;&nbsp;
     <a href="Sausage_2.ppt" target="_top">SAUSAGE MARKETING PPT</a>
     </div>
     <div id="container">
     <div id= "left_col"> 
     <center>
     <h6>Gourmet <i>Pork Sausage</i></h6>
     </center>
     <ul>
     <li><a href="pdb_reading11.php">Gourmet Broccoli Rabe &amp; Romano Cheese Pork Sausage</a></li>
     <li><a href="GarlicHerb_1.htm">Gourmet Garlic, Herb &amp; Sun Dried Tomato Pork Sausage</a></li>
     <li><a href="SweetItalian_1.htm">Gourmet Sweet Italian Style Pork Sausage</a></li>
     <li><a href="HotItalian_1.htm">Gourmet Hot Italian Style Pork Sausage</a></li>
     </ul>
     <center>
     <h6><i>Seafood Items</i></h6>
     </center>
     <ul>
     <li><a href="JumboLumpCrabCakes_1.htm">Gourmet Maryland Style Jumbo Lump Crab Cakes</a></li>
     <li><a href="SauteShrimp-1.htm">Premium Wild American Sautꪮg Shrimp</a></li>
     <li><a href="StuffedShrimp_1.htm">Premium Wild American Shrimp Stuffed with Jumbo Lump Crabmeat</a></li>
     </ul>
     </div>
     <div id="page_content">
     <p>This is my page content</p>
     <button type="button" onclick="loadXMLDoc()">Change Content</button>
     </div>
     </div>
     <div id="footer">
    
     </div>
    
     </body>
    
     </html>
    and here is TEST.txt
    Code:
    <p>AJAX is not a new programming language.</p>
    <p>AJAX is a technique for creating fast and dynamic web pages.</p>
    I Got The AJAX Stuff From: http://www.w3schools.com/ajax/default.asp


    I Hope This Helped, I really cannot think of anything else that wold make it not work, if it still doesn't work try a different computer, if it works there clear all your webbrowsers cookies exd. on the computer it is not working on....

  5. #5
    Join Date
    Jul 2012
    Posts
    6
    thanks for ur reply iGeekiHackiMatt..... i think still u didnt get the question wat i mean to say...


    suppose user clicks on link Gourmet Broccoli Rabe &amp; Romano Cheese Pork Sausage which is to the left of the line..... its content should be visible to the right hand side of line and not in the new tab....as it is opening now...also which link user has clicked should be appear in the the address bar....

  6. #6
    Join Date
    Jul 2012
    Posts
    32
    Sorry, I Have been Busy the past few days,,, Umm i am not for sure how to fix that because i am not that good at AJAX yet... But i can tell you if you take out target="_top" in the <a> tag then it will have to load the page, but it will open in the same window/tab/frame

  7. #7
    Join Date
    Jul 2012
    Posts
    6
    iGeekiHackiMat ..... after removing the target="_top" ...the issue is same....it is not loading the content in the content area....

  8. #8
    Join Date
    Jul 2012
    Posts
    32
    When Removing The target="_top" It Should Make It So it Is A Normal Link, So I Can I See The Linked HTM File?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles