Reply
Ajax - Load Content After Every Minute!
Old 10-31-2009, 07:17 AM Ajax - Load Content After Every Minute!
evans123's Avatar
Ultra Talker

Posts: 350
Trades: 0
Can anyone help me or tell me how to send an ajax request upon a live time change for example

15:15 - Load Content
15:16 - Load Content
15:17 - Load Content

ect...

Is this possible?
__________________
SoldierExteme.com - Free MMORPG - sign-up today!
Backthebulls.com - Free online games (mad_willsy's)
Msnextra.co.uk - Msn Items
evans123 is offline
Reply With Quote
View Public Profile
 
 
When You Register, These Ads Go Away!
Old 10-31-2009, 07:33 AM Re: Ajax - Load Content After Every Minute!
chrishirst's Avatar
Super Moderator

Posts: 22,248
Location: Blackpool. UK
Trades: 0
It is but you would probably crash the browsers after a few iterations.

A JAVA applet would be a better method, with that you could update every few seconds without draining resources.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | People Counting System | Bits & Bobs
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 10-31-2009, 07:45 AM Re: Ajax - Load Content After Every Minute!
evans123's Avatar
Ultra Talker

Posts: 350
Trades: 0
do you think it would crash if i used window.SetInterval(functio, time); I only need it to load a string of text etc.
__________________
SoldierExteme.com - Free MMORPG - sign-up today!
Backthebulls.com - Free online games (mad_willsy's)
Msnextra.co.uk - Msn Items
evans123 is offline
Reply With Quote
View Public Profile
 
Old 10-31-2009, 08:12 AM Re: Ajax - Load Content After Every Minute!
chrishirst's Avatar
Super Moderator

Posts: 22,248
Location: Blackpool. UK
Trades: 0
It's not what you load but how! Each iteration will which take up a bit of memory, try leaving Gmail (AJAX version) open for a while and see how the memory usage goes up.

Also IE locks the XMLhttp object so you have to do a bit of hoop jumping to make it fully cross browser functional, even ver8 seemingly, when I tested it a few months ago. (I use AJAX in a application backend that needs to make several server calls)
http://keelypavan.blogspot.com/2006/...ect-in-ie.html

http://www.webmaster-talk.com/javasc...ow-i-hate.html
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | People Counting System | Bits & Bobs
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 10-31-2009, 08:23 AM Re: Ajax - Load Content After Every Minute!
evans123's Avatar
Ultra Talker

Posts: 350
Trades: 0
would this work

Code:
//Submit Data
function submitData(pageId, data, type) {
type = typeof(type) != 'undefined' ? type : 'GET';
//passedData = typeof(passedData) != 'undefined' ? passedData : '';
$(document).ready(function()
{
    message();
    $.ajax({
    type: type,
    data: data+'&pageId='+pageId,
    url: 'ajax/includes/content.php',
    cache: false,
    success: function(data){
     $('#content_holder').html(data);
     remove_message();
    }
    });
});
return false;
}
Run this on a timer???
__________________
SoldierExteme.com - Free MMORPG - sign-up today!
Backthebulls.com - Free online games (mad_willsy's)
Msnextra.co.uk - Msn Items
evans123 is offline
Reply With Quote
View Public Profile
 
Old 10-31-2009, 09:49 AM Re: Ajax - Load Content After Every Minute!
chrishirst's Avatar
Super Moderator

Posts: 22,248
Location: Blackpool. UK
Trades: 0
haven't a clue.

I assume you are using some kind of "framework"?
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | People Counting System | Bits & Bobs
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 10-31-2009, 09:56 AM Re: Ajax - Load Content After Every Minute!
evans123's Avatar
Ultra Talker

Posts: 350
Trades: 0
yup, jquery!
__________________
SoldierExteme.com - Free MMORPG - sign-up today!
Backthebulls.com - Free online games (mad_willsy's)
Msnextra.co.uk - Msn Items
evans123 is offline
Reply With Quote
View Public Profile
 
Old 10-31-2009, 10:05 AM Re: Ajax - Load Content After Every Minute!
chrishirst's Avatar
Super Moderator

Posts: 22,248
Location: Blackpool. UK
Trades: 0
Ok! I don't use any of them so I have no idea of the syntax.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | People Counting System | Bits & Bobs
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to Ajax - Load Content After Every Minute!
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 



Page generated in 0.13074 seconds with 13 queries