Go Back   CodingForums.com > :: Client side development > JavaScript programming > Ajax and Design

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-04-2009, 01:30 AM   PM User | #1
metazoid
New to the CF scene

 
Join Date: Sep 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
metazoid is an unknown quantity at this point
Exclamation Ajax / Jquery Dilemma

Code:
function platform(a) {
$(document).ready(function(){var ajaxDelay=1000;setInterval(function(){$('#mfeed').load('feed.php?platform='+ a +'&level=you');},ajaxDelay);}); 
}
Then calling it to update via a link as such:
Code:
<a href="javascript:void(0)" onclick="platform('site')">Site</a>
The problem is that my knowledge of jquery is not that in depth and the jquery function while it fetches the page via ajax perfectly and reloads the ajax every 1 second creating a live feed when I clicked on a link to inject a new variable into the javascript function changing the output of the feed it changes but every second it switches between the old and new feeds in the ajax, also the more categories are click (i.e. onclick="platform('other')") it adds that one into the rotation of feeds that show up.

Whats suppose to happen is when you click the link the new variable is injected into the ajax request and it changes to that one and the old one discontinues. This however is not happening and I have tried many different methods to make it work. Any help in this matter would be greatly appreciated as I'm quite frankly at the end of my wits.
metazoid is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 11:44 AM.


Advertisement
Log in to turn off these ads.