• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Probelm with alert box

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 2596
Android Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Problem is probably due to time delay that alert box causes. You can try setTimeout to do the same.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic