When I remove or comment out the alert statement it fails.

$(document).ready(function(){
     $('#div_db, #div_tables, #div_data, #div_nav').hide();  
     $("#div_db").load("generic_get_dbs.php"); 
     $('#div_db').show();
alert('line 5');    
       }); 

Recommended Answers

Answered by Traevel 216 in a post from

By "fails", what do you mean?

What comes to mind is the blocking nature of an alert(). It blocks execution while awaiting your click. Removing the alert would remove the block.

It's going fine here in a test. It hides the divs, loads a text file and shows the div …

Jump to Post

All 2 Replies

By "fails", what do you mean?

What comes to mind is the blocking nature of an alert(). It blocks execution while awaiting your click. Removing the alert would remove the block.

It's going fine here in a test. It hides the divs, loads a text file and shows the div regardless of the alert being present.

I solved the problem by moving different parts of the script to different files.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.