Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jan 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Loading external html into a div

    Good day,
    I am trying to load a div from one page, into a div on another page.

    On the webpage I am loading the new div to I put:

    <script> $("#activity").load("/master-module.html #module2");</script>

    The place where the info is going is:

    <div id="activity" class="buildBoxes-dreamit">
    <h2 class="subTitle">Sports Activity |</h2><
    <img src="images/mod1.jpg" width="236" height="116" />
    <h3 class="buildH3"><br />
    HELLO PEOPLE.</h3>
    <h4 class="afterH4">Test text <br />
    You may also like:</h3><br/>
    <h3 class="buildH5"><img src="images/learnArrow.gif" width="3" height="5" /> Trailer Hitch Plug<br />
    </div>



    On my page called master-module.html I have nine modules. I am trying to pull in:


    <div id="module2">
    <div class="buildBoxes-dreamit">
    <h2 class="subTitle">Sports Activity
    <h3 class="buildH3"><br />
    HELLO LITTLE ONE.</h3>
    <h4 class="afterH4">TEST NEW MODULE<br />
    </h4>

    </div>
    </div>


    Why doesn't this work right? It looks right to me... what am i missing??

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,863
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    Can we have a link to your page?
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    Senior Coder
    Join Date
    Jan 2005
    Location
    Memphis, TN
    Posts
    1,788
    Thanks
    8
    Thanked 131 Times in 129 Posts
    Are you actually loading jQuery? Your script looks fine so that's my first guess.
    Stop making things so hard on yourself.
    i is tugbucket :: help raise tugburg :: Whitehaven Kiwanis


  •  

    Posting Permissions

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