home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Ask a Tech Support Question (free)!

Ajax refresh div

Reply
Get bargains at  »  Dealighted.com
 
Thread Tools Search this Thread
Currently Active Users: 1489
Discussions: 200,989, Posts: 2,379,858, Members: 246,356
Old April 23rd, 2009, 07:32 PM   Digg it!   #1 (permalink)
Junior Member
 
Join Date: Apr 2009
Posts: 3
Red face
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.
Olvie is offline   Reply With Quote
Old April 23rd, 2009, 10:49 PM     #2 (permalink)
Super F@D Folder
 
Join Date: Jun 2004
Posts: 5,083
Send a message via AIM to sr71000
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?
sr71000 is offline   Reply With Quote
Old April 24th, 2009, 01:13 PM     #3 (permalink)
Junior 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
Olvie is offline   Reply With Quote
Old April 25th, 2009, 08:15 PM     #4 (permalink)
Super F@D Folder
 
Join Date: Jun 2004
Posts: 5,083
Send a message via AIM to sr71000
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?
sr71000 is offline   Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to make a DIV rest at the bottom of another DIV in CSS? celebritymusic Webmastering and Programming 1 March 1st, 2007 10:15 AM
AJAX: Determine the link "onclick" within a DIV gberz3 Webmastering and Programming 2 September 6th, 2006 03:53 PM
help with setting desktop refresh rate to game refresh rate sweeper2 Graphics Cards and Displays 7 December 27th, 2005 08:54 PM


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Most Active Discussions
Is It Just Me? (3063)
Charges against non-tippers dropped.. (20)
Delete an OS (17)
Nvidia GTX 260 problem (9)
Laptop with wireless problem. (12)
windows vista security holes (19)
Wireless Televisions. (12)
CPU fan stops spinning randomly (11)
Regular Build (11)
Point and Shoot Camera Suggestions. (8)
windows 7 problem (7)
[F@H SPAM 11/16/09] ! 1/2 months to.. (39)
Internet Lost (5)
Multiple Restarts Required at Boot (5)
Recent Discussions
How to converter MTS Video to HD mpeg.. (0)
Can a page file be "too big".. (0)
Point and Shoot Camera Suggestions. (8)
Looking for new motherboard (0)
Size after cutting 700Mb file is 2.5 .. (0)
Delete an OS (17)
[F@H SPAM 11/16/09] ! 1/2 months to r.. (39)
windows vista security holes (19)
updating BIOS via winflash, claims fi.. (1)
New Server Configuration Suggestions (0)
Desktop Calendar Application (0)
cheap gaming laptop? (12)
Unallocated Space (2)
help me pls laptop just stopped worki.. (1)
C# + LINQ Help (7)
Nvidia GTX 260 problem (9)
Dynex DX E-402 (3)
EVGA 9800 gtx help with finding a goo.. (12)
Multiple Restarts Required at Boot (5)
cell phone won't work (0)
Is the PSU I received dead? (15)
Can't open Word (12)
Steam ID's, Gamertags etc... (4)
Games, Cables, PCI cards, and more fo.. (6)
Dept. of HS: NSA 'Helped' Develop Vis.. (17)


All times are GMT -4. The time now is 05:36 AM.
TechIMO Copyright 2009 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28