Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

why won't a display='block' show content until script terminates?

Status
Not open for further replies.

1DMF

Programmer
Jan 18, 2005
8,795
GB
Hi,

I seem to have hit a major snag, I'm trying to write an AJAX application, however, I issue a
Code:
myobject.style.display='block';

but nothing is displayed until the entire script finishes running?

this is causing an error as i'm trying to set the focus to a specific textarea and it is erroring because the text area isn't visible.

But i've made it visible with the above prior command , i don't understand?

Why is this happening

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

Google Rank Extractor -> Perl beta with FusionCharts
 
Sorted! it was a hierachy issue.

although I was displaying the the element in question a surrounding div higher up the tree was still display=none.

Because the screen only seemed to display the content once the script terminated, I was observing effect and misunderstanding cause.

took me a while to track this sucker down!



"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

Google Rank Extractor -> Perl beta with FusionCharts
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top