Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Ajax Request Messing Up Format, need help to figure out a better way to do this.
sonesay
post Nov 28 2007, 08:17 PM
Post #1


|||[ n00b King ]|||
*********

Group: [HOSTED]
Posts: 642
Joined: 20-June 07
From: Auckland
Member No.: 45,102



my merit system here.

http://sonesay.trap17.com/chars.php

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.

CODE
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.



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.
Go to the top of the page
 
+Quote Post
sonesay
post Nov 29 2007, 06:30 AM
Post #2


|||[ n00b King ]|||
*********

Group: [HOSTED]
Posts: 642
Joined: 20-June 07
From: Auckland
Member No.: 45,102



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..

Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Ajax And Php(9)
  2. Ajax Web Apps(0)
  3. Ajax: Achieve Ajax Program In 5 Lines Of Code!(1)
  4. Help With Ajax(0)
  5. Scripting Help On Ajax Shoutbox(1)
  6. Remote Ajax(1)
  7. Concerns On Ajax With Java(3)
  8. Ajax Code Need Help Debugging.(9)


 



- Lo-Fi Version Time is now: 25th July 2008 - 07:48 PM