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

free web hosting
Open Discussion > CONTRIBUTE > Computers > Programming Languages > Java, Java Servlets, Java Script, & JSP

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

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

 

 

 


Reply

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


Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.

Recent Queries:-
  1. ajax messing up <% - 354.73 hr back. (1)
  2. javascript firefox "delay update" - 988.86 hr back. (1)
Similar Topics

Keywords : ajax, request, messing, format, figure,

  1. Ajax Code Need Help Debugging.
    (9)
  2. Concerns On Ajax With Java
    (3)
    Source article from Sun: http://java.sun.com/developer/technicalArticles/J2EE/AJAX/ Well, from
    this article, it shows that Ajax can be achieved with Java using Java Servlets or JSP's. For
    those who don't know what AJAX is, it's an object in Javascript technology that allows for
    instant communication between client-side and server-side. It's like changing a page's
    content without having to reload the whole page. Let's move on... Now when I looked at the JSP
    source code, the servlet's function was to simply validate a text and send back a r....
  3. Remote Ajax
    Wtf?! (1)
    Any reason why Ajax doesn't work remotely? It looks almost as if ajax only works if its getting
    or sending info from the same server. What gives? could this have anything to do with the possible
    abuse of brute force scripts? If so, wouldn't this be a limitation in the browser only? Are
    there any browsers that allow remote Ajax? ...or am I doing something wrong? (I left that question
    at the end for a reason... I am sure that my script is flawless seeing as it works perfectly if i
    try to access something locally, but the second I try something remote, no info ....
  4. Scripting Help On Ajax Shoutbox
    (1)
    HI, I'm currently working on an AJAX web app. It's a shoutbox. I have here attached the .js
    file fully documented so it's easy to understand. Problem: An error message alert occurs in IE
    6 Help: I need someone who can fix a code so that the error won't show up in IE. Note: I've
    tested it under Firefox and Opera and it works very well. Here's the code: /** * ezShout -
    AJAX/PHP ShoutBox * by Albert Villaroman * * For help and tutorials on usage, please refer to
    manual * * Note: Due to JS lack of standard OOP conventions, treat "Shoutbox....
  5. Help With Ajax
    I can't figure it out... (0)
    Hello, I have recentlty ran into a problem on my website : When a user logs in, it adds him to an
    active users list in the MySQL database, but if they don't click the "logout" button, and just
    leave the site, it keeps them in the active users list forever until I manually go into the database
    and take them out. I heard from a friend that you could use AJAX to find out if the user is active,
    if he's not and he stays inactive for a certain amount of time, then it will take him out of the
    active users list. So I go to learn AJAX because all of the other languages I....
  6. Ajax: Achieve Ajax Program In 5 Lines Of Code!
    (1)
    Well Last night, after a week of irritation and errors I finally created an easy Javascript object
    that easily and quickly allows you to develop an AJAX program in just 5 easy steps! Here's
    the link to the object I've created: http://www.demolaynyc.astahost.com/ajaxConn/ajaxConn.js
    Download it and read the Readme file that's under the same directory:
    http://www.demolaynyc.astahost.com/ajaxConn/Readme.html Basically what this object does is to
    connect to a server-side script (".php, .asp, .jsp, etc"), and what ever this script displays is
    sent back ....
  7. Ajax Web Apps
    (0)
    Well I just finished learning AJAX and want to start an AJAX web application. the thing is that I
    don't know what kind of application I want to work on so I'm asking you guys to come up
    with one that will use HTML, CSS, Javascript and PHP. Nothing too big but nothing to small as well.
    I'm starting a small ShoutBox. I want a type of application that would be used by companies. I
    have a software in mind where companies like Fast Food restaurants could install on their websites
    and have customers easily make orders while employees will see incoming orders live....
  8. Ajax And Php
    question (9)
    Hi Dears i want learn Ajax , i know PHP and mysql , i want include ajax interface into my php
    projects . but i can not find tutorial about ajax in pixel2life.com or google. i need good tut about
    begin ajax and how its work and more samples to use if you have good link about ajax plz post here
    And if you about ajax software kit plz post here thanks /smile.gif" style="vertical-align:middle"
    emoid=":)" border="0" alt="smile.gif" /> ....
  9. Ajax Shoutbox For Ipb - Beta 2 Release
    (4)
    Hi guys, Here's one of our preview releases of the projects going on under Antilost - an AJAX
    based ULTRA-LIGHT (only 20KB) Shoutbox, that works extremely fast and without refreshing your whole
    page. Can be easily integrated into IPB - although full integration module not ready yet. A
    demonstration can be found at: http://www.antilost.com/community/ Keep in mind that this is a
    develpomental release and is not completed yet. As we finish more and more of the coding part, the
    subsequent releases will be readily made availabel for download. So make sure you keep c....
  10. Ajax
    Anybody else using it? (14)
    Hi everybody, I'm starting to use AJAX (Asynchronous Javascript And Xml), and it is quite nice
    and very cool. I was just wondering if anyone else is using it here yet?? Thanks! ....

    1. Looking for ajax, request, messing, format, figure,

*RANDOM STUFF*





*SIMILAR VIDEOS*
Searching Video's for ajax, request, messing, format, figure,

*MORE FROM TRAP17.COM*
advertisement



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



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute your information that might help someone here.
Ask your Doubts & Queries to get answers.. "Together, We enlight each other!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE