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 6 of 6
  1. #1
    Regular Coder
    Join Date
    May 2003
    Location
    Chicago, IL
    Posts
    131
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Ajax call loading entire page to target area...not just refreshing target?

    I'm using a Prototype ajax request.

    It works...sort of.

    Code:
    new Ajax.Updater('DownloadList', '/UploadTest/client_upload.php', { method: 'get' });
    The function is fired as intended. I have a table with the ID "DownloadList" whose data I'm trying to refresh. The parent page is named "client_upload.php".

    Currently the call functions, however, it loads the entire page to the target area rather then just refreshing the target area. I'm sure it's because I've not included all the necessary parameters but I'm not sure what it/they would be.

    Could someone enlighten me?

    Thanks!

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    Regular Coder
    Join Date
    May 2003
    Location
    Chicago, IL
    Posts
    131
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Hey,

    thanks for the reply.

    Well, not really. I'm using the Prototype framework to make these calls. The call is in fact functioning, I am getting my data, however, the entire reference page is being loaded into my container rather then just seeing the container refresh.

  • #4
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    I'm guessing you didn't even try the script in the link I posted. It loads the page you want using ajax and only in the div you want it.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #5
    Regular Coder
    Join Date
    May 2003
    Location
    Chicago, IL
    Posts
    131
    Thanks
    3
    Thanked 0 Times in 0 Posts
    I'm guessing you didn't even try the script in the link I posted.
    I didn't make assumptions about what you provided - in fact I did look!

    My response is the way it was because I looked at the resource you provided and which is why I re-iterated the fact I'm using the Prototype frame work.

    It loads the page you want using ajax and only in the div you want it.
    I'm not trying to load an entire page. As I had state in my initial post, I'm trying to refresh data in a table on my parent page. I already have the ajax the call to my content functioning correctly. I've since figured out that my issue is not one with javascript. It's with my server side script and passing the propper session info to retrieve the necessary data.

    Thank you.

  • #6
    Regular Coder
    Join Date
    Feb 2005
    Posts
    679
    Thanks
    0
    Thanked 16 Times in 15 Posts
    If the page 'UploadTest/client_upload.php' contains the table 'DownloadList' and you request '/UploadTest/client_upload.php' to be loaded into the table, I'd expect the whole page to be added like you discribe.

    What are you trying to load?


  •  

    Posting Permissions

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