× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.




Sounds like you have some sort of JavaScript bug - hard to say what that might be.

But if a row can't be deleted, how about leaving the delete button off the screen when the page is generated, rather than giving the user the option of clicking it?

-Nathan.



----- Original Message ----
From: Craig Jacobsen <CraigJacobsen@xxxxxxxxxxx>
To: Web Enabling the AS400 / iSeries <web400@xxxxxxxxxxxx>
Sent: Tuesday, July 14, 2009 8:24:18 AM
Subject: [WEB400] Waiting for Ajax call to fill global variable

I have a global javascript variable defined and am looping through a series
of rows to see if a box is clicked.
If the delete button is clicked, I see if the row clicked can be deleted
(not in a table) through an AJAX call and hold on to the
response by accumating the returning message into the global variable, then
alerting that it (may be more than 1) cannot be deleted.
Problem is, the global variable is full on the callback but when I return
after the callAjax, it's sometimes empty.
This usually happens after the first call and is usually successful after
that.
I have temporarily fixed this problem by putting an alert('getting info') to
the screen only when the global variable is empty.
I'm guessing this gives a wait for the global variable to fill.
I have tried a pause function but that doesn't always work, the alert always
does.
Has anyone else had this problem? If so, is there a more elegant way to fix
it?

Thanks in advance,

Craig

Craig Jacobsen
Sr P/A
URL Pharma
7722 Dungan Rd
Philadelphia, Pa 19111
215.697.1719


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.