I am working on a comment voting system.
I have a page profile_new.php?id=194
That page then uses jquery tabs to load an external file of
sketch-comments.php?id=194&thumb=images/thumbs/1.png
Then in that tab the comments are in a scrolling div
(jqueryScrollPane- http://jscrollpane.kelvinluck.com/)
Then, on each comment, it uses a rollover to show the + and – button. (Just like youtube)
Here is the div that shows up on rollover. (just showing one button)
<div class="comRate" id="c<?php echo $comID;?>">
<div id="up<?php echo $comID;?>" >
<a href="#" id="addUpDown" rel="blah"> show number of "+" here </a>
</div><!--up-->
</div><!--comRate-->
My question: Does all this extra stuff matter when I just want to reload this div on the ajax response in order to display an updated number? I’m having trouble understanding how to use the load(); function to say the least.
How can I just reload the .comRate div? Do I need all the variables I used to rebuild the URLS to get to this spot?
$("#c" + comID).load(????????);
Thanks!
Dave
I am guessing you need to send the comId back to the server to get the correct number of responses?
If so you would could use it like this?
load() takes the value from passed resource location and loads the value into the component.
jQuery doc: http://api.jquery.com/load/
So if YourUpdateUrl.php returned
echo "<strong>15</strong>";