• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Probelm with alert box

 
ABHI IYER
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm facing strange problem due to an alert box.

I have 2 combo boxes (DROP DOWN MENUS)
I am filtering the options displayed in the second drop-down menu based on the option selected in the first drop-down menu.

I had used some alert boxes for debugging while writing the code.
Once the code was working fine, I removed the alert boxes.
Strangely the filtering stopped working and the second-drop down menu started displaying the default option instead of the options based on the filtering logic.

If i put an alert box before the code that has the filtering logic (basically a for loop), the options are filtered correctly.

Does the alert box have any impact on refreshing the values of combo boxes (in the view mode)??? Is there something that can be done to avoid this problem?
 
Manish Hatwalne
Ranch Hand
Posts: 2596
Android Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Problem is probably due to time delay that alert box causes. You can try setTimeout to do the same.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the code you are using? Showing us some code will make it easier for us to tell you what is wrong.

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic