Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Linux, Apache, MySQL, PHP
  4. ajax problem

ajax problem

Scheduled Pinned Locked Moved Linux, Apache, MySQL, PHP
databasehelp
3 Posts 3 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    umeshdaiya
    wrote on last edited by
    #1

    hi, i have a page which value is added, edited and deleted using Ajax. in this page when we click on add button than display a textbox and after entering value in this box click on button than value is store in database and show in list box, same process for all but some time its shows value in list box but some time its require refresh or when i enter second data then show last value. this happen some times not all time. :-D

    M R 2 Replies Last reply
    0
    • U umeshdaiya

      hi, i have a page which value is added, edited and deleted using Ajax. in this page when we click on add button than display a textbox and after entering value in this box click on button than value is store in database and show in list box, same process for all but some time its shows value in list box but some time its require refresh or when i enter second data then show last value. this happen some times not all time. :-D

      M Offline
      M Offline
      Mohammad Dayyan
      wrote on last edited by
      #2

      Well, what do you wanna know ? If you wanna know how you can solve your problem , I can't solve it without see your snippet code ! Please post your code or refer our to your web page .

      1 Reply Last reply
      0
      • U umeshdaiya

        hi, i have a page which value is added, edited and deleted using Ajax. in this page when we click on add button than display a textbox and after entering value in this box click on button than value is store in database and show in list box, same process for all but some time its shows value in list box but some time its require refresh or when i enter second data then show last value. this happen some times not all time. :-D

        R Offline
        R Offline
        Ranjit Viswakumar
        wrote on last edited by
        #3

        It sounds like you have 2 AJAX queries running. One to send the added text to the database, and then another to refresh the displayed contents. Think of AJAX as XL streams leaving and entering through channels. We need to make sure the XML streams do not attempt to use the same channel. If they do, the second will suffer if the first has not completed yet. A way to get around this is to assign a random session ID to the XML stream to differentiate it. Consider this Javascript AJAX function- http://whatsaranjit.com/includes/grabData.js[^] Notice the line: url=url+"&sid="+Math.random() This is so that anytime an AJAX request is initiated, they are unique and will not overlap. Try that out. Good luck!

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups