Jump to content
xisto Community
Sign in to follow this  
sonesay

Ajax Request Messing Up Format need help to figure out a better way to do this.

Recommended Posts

my merit system here.

http://forums.xisto.com/no_longer_exists/

I've got a heading where it includes a number being the total that can change. Initially I've loaded it with a default value of 0 and then after the ajax retrieval gets replaced with a dummy value of 1 for now(I will do correct calculations later). The problem here is I'm not sure how I'm suppose to layout the heading properly to allow ajax updates to take place and only affect the number count. What happens after the ajax call is the new output number in this case '1' is is put on a new line of its own.

	echo "<h4>General <span id='general_total'>0</span> <button id='btn_general' onclick=\"tv('general_merits','btn_general');\">-</button></h4>";
echo "</div>"; linenums:0'>echo "<div id='heading_general'>"; echo "<h4>General <span id='general_total'>0</span> <button id='btn_general' onclick=\"tv('general_merits','btn_general');\">-</button></h4>";echo "</div>";

By the way I'm using ext javascript frame work for the ajax calls. There might be a problem if the updates don't work first time round because of loading delays just try again. This problem is on my part with the javascript code but I will address it at another time.

[hr=noshade] [/hr]
ok i've fixed the update problem and put a 4 second delay on the update of 'General' merits point count so you can see the initial display and how it messes up after the ajax call.

Share this post


Link to post
Share on other sites

ok i've scraped the idea to just try and reload a span inside a div and gone with just a full reload of the div. It just works but not exaclty how i would like it.I need somone with IE to test it out if you can. I have no windows and wonder if it works for IE. I tested it out on FF and Safari and it works fine. How ever the buttons for modifying HP and MP merits dont seem to work under lolOpera..

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.