ajax problem
-
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
-
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
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 .
-
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
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!