06-03-2016, 08:57 AM
I hate to ask this here because it feels like general web development but I'm stumped;
I have a page that has a set of categories on it that display a list of items from a db which each category held in a div being generated from a for loop.
http://hastebin.com/vezeluyigi.xml
http://hastebin.com/duyavanuvo.xml
on line 140 there is a script that effectively does what I need, but when i put the
` <script>
jQuery().ready(function(){
setInterval("getResult()",1000);
});
function getResult(){
jQuery.post("_category.php?Key=<?php echo $eventKey ?>",function( data ) {
jQuery("#cat<?php echo $catValue ?>").html(data);
});
}
</script>'
in the forloop it doesn't seem to work.
Im making a supplies list that automatically updates every few seconds to show when a user when another user has grabbed the supply needed.
When I hard code the redirects in the jQuery script it works but I can't differentiate the catergories.
Do you guys have any ideas on how I might solve this problem.
I have a page that has a set of categories on it that display a list of items from a db which each category held in a div being generated from a for loop.
http://hastebin.com/vezeluyigi.xml
http://hastebin.com/duyavanuvo.xml
on line 140 there is a script that effectively does what I need, but when i put the
` <script>
jQuery().ready(function(){
setInterval("getResult()",1000);
});
function getResult(){
jQuery.post("_category.php?Key=<?php echo $eventKey ?>",function( data ) {
jQuery("#cat<?php echo $catValue ?>").html(data);
});
}
</script>'
in the forloop it doesn't seem to work.
Im making a supplies list that automatically updates every few seconds to show when a user when another user has grabbed the supply needed.
When I hard code the redirects in the jQuery script it works but I can't differentiate the catergories.
Do you guys have any ideas on how I might solve this problem.