SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast
    Join Date
    Jun 2014
    Posts
    70
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    AJAX Load Content From Another Internal Page

    Hiya Everyone,

    I've removed my sidebar on this page to make it easy to maintain the vast amount of growing pages, to be able to edit my sidebar now located here.

    New HTML:
    Code:
    <div id="FetchSideBar">
    
    </div>
    New Javascript:
    Code:
    $(document).ready(function(){
    	$('#FetchSideBar').load('RaffleBananza.com/admin/SideBar.html');
    })
    This is actually my first AJAX attempt, I may have gone around doing what I wish to do completely wrong, or correct apart from some syntaxes or whatnot?

    Best Regards,
    Tim

  2. #2
    SitePoint Addict WolfShade's Avatar
    Join Date
    Mar 2014
    Location
    St. Louis, MO, USA
    Posts
    282
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Seems pretty straightforward, to me. If it isn't broke, you did it correctly. I'm a little OCD, so I'd put a semi-colon after the "})" on the last line, but it's not going to break if you don't.

    V/r,

    ^_^

  3. #3
    SitePoint Enthusiast
    Join Date
    Jun 2014
    Posts
    70
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by WolfShade View Post
    Seems pretty straightforward, to me. If it isn't broke, you did it correctly. I'm a little OCD, so I'd put a semi-colon after the "})" on the last line, but it's not going to break if you don't.

    V/r,

    ^_^
    Looking at the page I've set it up on, it is not working.

  4. #4
    SitePoint Enthusiast
    Join Date
    Jun 2014
    Posts
    70
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I've just resolved this issue. All I needed to do was to add http://

  5. #5
    SitePoint Addict WolfShade's Avatar
    Join Date
    Mar 2014
    Location
    St. Louis, MO, USA
    Posts
    282
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    AH! Missed that one. Good eyes.

    ^_^

  6. #6
    SitePoint Enthusiast
    Join Date
    Jun 2014
    Posts
    70
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by WolfShade View Post
    AH! Missed that one. Good eyes.

    ^_^
    The irony!!! I'm actually registered blind/severally-sighted and need a minimum of a x500 percent magnification enabled :P


Bookmarks

Posting Permissions

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