Current location: Hot Scripts Forums » General Web Coding » JavaScript » to refresh a part (not page )


to refresh a part (not page )

Reply
  #1 (permalink)  
Old 07-21-07, 09:02 AM
zodehala zodehala is offline
Wannabe Coder
 
Join Date: Mar 2007
Posts: 191
Thanks: 0
Thanked 0 Times in 0 Posts
to refresh a part (not page )

how can i refresh a part of a page (see image in attachment )
Attached Images
File Type: jpg iv.jpg (10.5 KB, 2119 views)
Reply With Quote
  #2 (permalink)  
Old 07-21-07, 09:32 AM
Nico's Avatar
Nico Nico is offline
Community Leader
 
Join Date: Sep 2005
Location: Spain
Posts: 8,075
Thanks: 11
Thanked 88 Times in 83 Posts
That depends on what you want to do.
If it's an image you want to refresh or change, you can use JavaScript alone. If you want to change a text by clicking on a button you can do that with JavaScript too, unless you want to pull the text from a database or the server in general. Then you'll need AJAX.

Explain a bit better what you're trying to do, and I can give more specific help.
Reply With Quote
  #3 (permalink)  
Old 07-25-07, 11:46 AM
semodders semodders is offline
Newbie Coder
 
Join Date: Jul 2007
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
you can add an frame and put an java code to refresh that frame.
Reply With Quote
  #4 (permalink)  
Old 07-25-07, 04:48 PM
TwoD TwoD is offline
Community VIP
 
Join Date: Sep 2003
Location: 404
Posts: 1,813
Thanks: 0
Thanked 0 Times in 0 Posts
Not "java", "JavaScript"

What semodders' referring to is usually known as the hidden (i)frame method. It's an old way of simulating asynchronous requests by requesting a page from the server into the hidden frame and then read that data from the main frame when it's done loadig. Sometimes, a small script is included in every requested page which simply calls a function on the main page to notify it that loading is complete.

This approach is usually used as a fallback if the xmlHttpRequest object (used by modern AJAX implementations) isn't available.

Allthough I doubt you need AJAX at all if you only want to change an image (and update cookies) since you only need to change the src property of the image to trigger a new request.
__________________
[W3Schools - learn all about the standards.] [QuirksMode - Browser Quirks] [MS's Online Reference Docs] [DOM in Gecko.]
Please pay attention to stickys, announcements and forum rules, thank you.
Please also remember Code Wrappers and [SOLVED] Marking, this helps everyone.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatically refresh page after page load failure jdugger JavaScript 3 08-05-10 09:16 AM
How to refresh part of the page not all In period of time sharif_aly PHP 2 11-17-06 02:33 PM
[turnkey] Lyrics site - $149 (LEGAL) rightinpoint General Advertisements 0 10-22-06 04:33 AM
Classified Ads skipper23 Perl 3 11-22-05 02:22 AM
Classified Ads skipper23 Perl 2 12-30-03 03:43 AM


All times are GMT -5. The time now is 11:27 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.