I was trying to keep it simple, but I can provide more code...
<div id="title" style="text-align:center; font-weight:bold;">---</div>
<div id="vote" style="text-align:center;">
<a id="voteup" href="#" onclick="submitVote(0,1);">[Vote Up]</a> | <a id="votedown" href="#" onclick="submitVote(0,0);">[Vote Down]</a>
document.getElementById("voteup").onclick = 'submitVote('+jwplayer().getPlaylistItem().mediaid+',1);';
document.getElementById("votedown").onclick = 'submitVote('+jwplayer().getPlaylistItem().mediaid+',0);';
document.getElementById("title").innerHTML = jwplayer().getPlaylistItem().title;
I'm trying to use AJAX so that the page doesn't reload when somebody votes on the video currently playing from the playlist.
I didn't include the AJAX code, but basically the function submitVote() sends a request to a PHP vote script.
The function uses two integer variables, the first one is the ID of the video, which should be updated in the vote links upon each video to match the ID of the current video. The second is just the vote (0 for vote down; 1 for vote up).
Before I started on the AJAX, the links pointed directly to the vote script, and there was no problem getting the variables in the href to change upon each video.
The title still changes just fine.