my problem is the following:
I have a popup with a grid, a textfield and some buttons (save, load, delete,...) on it. If the user clicks on the save-button and the value of the textfield is the same like a value of the grid, he gets a confirm-msgBox, if he really wants to save the value.
Because msgBox is asynchronous, the script runs through, without waiting for user interaction (choosing yes or no at the confirm-msgBox). How can I prevent this?
My code looks like the following:
[code]
// Many many code after the save-button is pressed..
var lenge = querystore.data.length; // the length of my store
for (var z = 0; z < lenge; z++) {
if (queryname == querystore.data.items[z].data.query) { // queryname is the value of the textfield // if the value of the textfield == one of the items of the store...
Ext.Msg.show({
title: 'Abfrage vorhanden',
msg: 'Die Abfrage ist bereits vorhaden, soll diese
Hi Animal,
thanks for your help, but could you please post me an example, because I'm not sure, if I got you right...
But I think, I have a workaround for the problem:
I create a boolean before the for-loop and set it to true. If the textfield == a value of the store, I set it to false. After the for-loop, I check the boolean, if it is false or true and run (if it is true) the run_the_request()-function.
To handle the user input with the yes and no-button, I create an on.click() with window.getElementById() and check what button was pressed.
Do you think, this might work?
Hi, I have the same requirements here.
I agree that a loop waiting for the popup to be closed would be a really bad idea but I can't see any other way to do that ...