Thread: Ajax refresh div
-
April 23rd, 2009, 06:32 PM #1Junior Member
- Join Date
- Apr 2009
- Posts
- 3
Ajax refresh div
Hi, I need to refresh a div. Just refresh/reload, with the same content. I'd tried the Ajax.Updater from the prototype framework; however it needs an Url. I only want to update the div with refresh button. Whenever users click refresh button, the page will only refresh DIV. Any ideas? Please help me out. Thanks.
-
April 23rd, 2009, 09:49 PM #2
I assume you're using some kinda server side scripting to build the div? Basically what you need to do is build a webpage that is just the div, then call it on update. Get what i mean?
-
April 24th, 2009, 12:13 PM #3Junior Member
- Join Date
- Apr 2009
- Posts
- 3
Thanks for your advice. Currently, I am using php. My situation is I have a page with multiple DIV sections. I would like users to click refesh buttons in order to refresh each div if they have done any changes. I am using Ajax.Updater; however, I don't know what URL that I should put in the second param. Actually, I don't want to refresh whole page only div. Kind of lost. Please advise. Thanks.
My code is as follows:
<script type="text/javascript">
function refreshcontent(v,fb0c4de,fdcdcdc){
alert(f_b0c4de);
new Ajax.Updater('contact', 'URL', { method: 'get' });
Olive
-
April 25th, 2009, 07:15 PM #4
in other words you would have a php script that creates the framework for the page (from < html > to < /html >), but would leave each div empty. Then you would create SEPARATE scripts for the content in each div. Now you have separate urls to load the data into each div. Make sense?
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
How to make a DIV rest at the bottom of another DIV in CSS?
By celebritymusic in forum Webmastering and ProgrammingReplies: 1Last Post: March 1st, 2007, 10:15 AM -
AJAX: Determine the link "onclick" within a DIV
By gberz3 in forum Webmastering and ProgrammingReplies: 2Last Post: September 6th, 2006, 02:53 PM -
help with setting desktop refresh rate to game refresh rate
By sweeper2 in forum Graphics Cards and DisplaysReplies: 7Last Post: December 27th, 2005, 08:54 PM



LinkBack URL
About LinkBacks



Reply With Quote

Here. CaTuesday. 6:30AM blood test completed.
Is It Just Me? v233893843