Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Load a page without refreshing?

  1. #1
    Join Date
    Jul 2006
    Posts
    64
    Thanks
    22
    Thanked 0 Times in 0 Posts

    Default Load a page without refreshing?

    Is there a ajax/js that will load pages within a div without a refresh/page url changing?

    So if i was to add a 3 page / step submission form, when the user press Next then new pages will just load in the DIV. Is this possible?

  2. #2
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

  3. The Following User Says Thank You to Medyman For This Useful Post:

    acctman (08-10-2008)

  4. #3
    Join Date
    Jul 2006
    Posts
    64
    Thanks
    22
    Thanked 0 Times in 0 Posts

    Default

    are their any other versions that you know of? this one seems to be the only one that works http://www.dynamicdrive.com/dynamici...jaxcontent.htm

    just wondering if there has been an improved version with less coding since that one was created in 2005.

  5. #4
    Join Date
    Jan 2006
    Location
    Ft. Smith, AR
    Posts
    795
    Thanks
    57
    Thanked 129 Times in 116 Posts

    Default

    just wondering if there has been an improved version with less coding since that one was created in 2005.
    Perfect example of how THIS thread ties in and is certainly well worth the effort...
    --------------------------------------------------
    Reviews, Interviews, Tutorials, and STUFF
    --------------------------------------------------
    Home of the SexyBookmarks WordPress plugin

  6. The Following User Says Thank You to TheJoshMan For This Useful Post:

    acctman (08-12-2008)

  7. #5
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Quote Originally Posted by acctman View Post
    just wondering if there has been an improved version with less coding since that one was created in 2005.
    Hmm, not on DD that I know of. You could google around for some though. I don't know of any off the top of my head as I don't really use any of these scripts.

    I'm a big jQuery user, so I do most of my AJAX through that. Incidentally, that might be what you're looking for. The code to load an external HTML page into a certain div is as simple as:

    Code:
    $.ajax({
      url: "test.html",
      cache: false,
      success: function(html){
        $("#results").append(html);
      }
    });
    Combined with the jQuery Form plugin, you should be all set.

    Let me know if you need any help in setting it up.

  8. The Following User Says Thank You to Medyman For This Useful Post:

    acctman (08-12-2008)

  9. #6
    Join Date
    Jul 2006
    Posts
    64
    Thanks
    22
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Medyman View Post
    Hmm, not on DD that I know of. You could google around for some though. I don't know of any off the top of my head as I don't really use any of these scripts.

    I'm a big jQuery user, so I do most of my AJAX through that. Incidentally, that might be what you're looking for. The code to load an external HTML page into a certain div is as simple as:

    Code:
    $.ajax({
      url: "test.html",
      cache: false,
      success: function(html){
        $("#results").append(html);
      }
    });
    Combined with the jQuery Form plugin, you should be all set.

    Let me know if you need any help in setting it up.

    an example would be great. what I'm doing is I have 3 step image submission process and I want to move through all 3 pages without refresh. the last 3rd page will be the submit page which will refresh to a different page.

  10. #7
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Here's an example with a few modifications:
    http://niler.net/examples/loadnewpage/file.html
    Jeremy | jfein.net

  11. The Following User Says Thank You to Nile For This Useful Post:

    acctman (08-12-2008)

  12. #8
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Quote Originally Posted by acctman View Post
    an example would be great. what I'm doing is I have 3 step image submission process and I want to move through all 3 pages without refresh. the last 3rd page will be the submit page which will refresh to a different page.
    Nile posted a basic example. You should be able to extrapolate from that.

    The bigger question is if you really are doing what you say you are. How are you submitting the different sections of the form? Saving them to a cookie? The fact that you say that the last page will be the "submit" page leads me to believe that you're looking for more of a virtual pagination script than something like what Nile and I have posted.

  13. The Following User Says Thank You to Medyman For This Useful Post:

    acctman (08-12-2008)

  14. #9
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    What about with something like this:
    http://niler.net/examples/loadnewpage/loadNextpage.html
    Jeremy | jfein.net

  15. The Following User Says Thank You to Nile For This Useful Post:

    acctman (08-12-2008)

  16. #10
    Join Date
    Jul 2006
    Posts
    64
    Thanks
    22
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Medyman View Post
    Nile posted a basic example. You should be able to extrapolate from that.

    The bigger question is if you really are doing what you say you are. How are you submitting the different sections of the form? Saving them to a cookie? The fact that you say that the last page will be the "submit" page leads me to believe that you're looking for more of a virtual pagination script than something like what Nile and I have posted.
    The 3 pages would like this user goes to page 1 edits image (hits next) data is processed and saved to image file, page 2 reloads that temp img, and then on page 3 final process of temp & rename when user hits the submit.

    Its part of a registration form and the idea is to limit the steps since editing the images is an Option that can be skipped. But there is still 2 other pages the uploading image page and the user info form. So if i can make the entire process seem like 2-3 pages when its actually 5pages that would be great.

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
  •