Javascript not updating

Register an Account
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 06-22-2009, 12:29 AM
oobie11's Avatar
Constant Pligger
Pligg Version: 1.0
Pligg Template: Custom, wistie
 
Join Date: Apr 2009
Location: Monterey, CA
Posts: 148
Hi, This is kinda hard to explain so I'll use pictures.
For some reason the javascript on my site is not updating when I push my vote button. It does not update until I refresh the whole page.
This is my vote button before I click the thumbs up:


Immediately after I click the thumbs up, the buttons are suppose to hide and it is suppose to say "voted". The "voted" <div> pops up, but the thumbs up/down buttons do not hide. Instead it appears that "voted" <div> just goes on-top of the buttons. Like this:


I think it has to do with the javascript not updating properly because after I refresh the page it all looks the way it suppose to. Like this:


Here is the code for my vote box.
Code:
<div id="votebox">
				<div class="votes">
				{checkActionsTpl location="tpl_pligg_story_votebox_start"}
					<span class="votenumber">
						<a id="xvotes-{$link_shakebox_index}" href="javascript:{$link_shakebox_javascript_vote}">{$link_shakebox_votes}</a>
					</span>
				</div>
				{checkActionsTpl location="tpl_pligg_story_votebox_end"}
					<div class="vote-bury">
					<span class="vote-for-it" id="xvote-{$link_shakebox_index}">
						{if $link_shakebox_currentuser_votes eq 0 && $link_shakebox_currentuser_reports eq 0}
							<a href="javascript:{$link_shakebox_javascript_vote}"><img src="icons/vote.png" style="border-style: none"/></a>
						{else}
							{if $link_shakebox_currentuser_reports neq 0}
								<span style="color: red">{#PLIGG_Visual_Vote_Report#}</span>
							{else}
								{if $pagename eq "user" && $user_logged_in neq $link_submitter}
									<a href="javascript:{$link_shakebox_javascript_unvote}">{#PLIGG_Visual_Unvote_For_It#}</a>
								{else}
									<span>{#PLIGG_Visual_Vote_Cast#}</span>
								{/if}	
							{/if}
						{/if}
					</span>
					{if $link_shakebox_currentuser_votes eq 0 && $link_shakebox_currentuser_reports eq 0}
					<span class="bury-it" id="xreport-{$link_shakebox_index}">
						<a href="javascript:{$link_shakebox_javascript_report}"><img src="icons/bury.png" style="border-style: none"/></a>
					</span>
					{/if}
					</div>
		</div>
Can anyone help me?
Thanks.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to make a Digg-style FAQ page with JavaScript and jQuery mendim Questions and Comments 25 09-14-2010 12:27 AM
JavaScript Error: Voting and Repping Comments GrantMePeace Questions and Comments 0 03-11-2009 02:37 PM
a lot of Javascript , I mean a looooooot !! neo2cold Questions and Comments 1 10-04-2008 09:48 PM
Might be time to think about better use of javascript jbowman Questions and Comments 1 07-20-2007 10:19 AM
AJAX and Javascript not working on Firefox 2 lcct83 Questions and Comments 5 04-02-2007 02:31 PM


Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Make a donation to support Pligg CMS development