SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: Dynamic content

  1. #1
    SitePoint Zealot
    Join Date
    Jul 2007
    Posts
    127
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Dynamic content

    Um, titles aren't really one of my strong points I guess.

    How can I dynamically load content into just a section of a page:
    - without using server side languages
    - without using any kind of frames

    I'm using a touch of Ajax right now, but I wanna know if there're other ways.

  2. #2
    SitePoint Member
    Join Date
    May 2010
    Location
    LA
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i think ajax is the best solution for you, if you donīt want to reload the page manually.

  3. #3
    SitePoint Zealot
    Join Date
    Jul 2007
    Posts
    127
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Darn.
    Yeah I actually have no server side supported on this, plus a full page reload really bugs me.

  4. #4
    ♪♪ ♪ ♪ ♪ ♪♪ ♪ ♪♪ Markdidj's Avatar
    Join Date
    Sep 2002
    Location
    Bournemouth, South UK
    Posts
    1,551
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Using the changeScript function I created in 2003. ALOT easier than ajax.....
    http://www.sitepoint.com/forums/showthread.php?t=135179

    use in this way....
    Code:
    el.onclick=function(){changeScript("new_content.js");return false;}
    and then new_content.js.....
    Code:
    el.innerHTML="<h1>This is new Content</h1>";
    I realy don't understand why most people use ajax unless you want to get code from another server. Why use javascript, convert it to a XMLHTTPresponse request, send it to the server, get back XML, convert it to html and embed it? Very long winded, when you can just send a javascript request to the server, which replies with the javascript code to make the changes.

    My livescript method is sooooo much easier.
    LiveScript: Putting the "Live" Back into JavaScript
    if live output_as_javascript else output_as_html end if


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
  •