By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,956 Members | 1,457 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,956 IT Pros & Developers. It's quick & easy.

window.status not setting because of form tag

P: 58
Hi all,

I have a perplexing problem here. I've developed some software using ASP.NET with C# in the code behind. I've been setting the "window.defaultStatus" in the code behind to send messages in the status bar to the user about their last actions (page loaded successfully, record stored successfully, etc.) I've been setting the "window.status" message with the JavaScript "onmouseover" event for various actions on the screen (click here to sort, click here to store, etc.) and as soon as they move their mouse away, it returns to the default message. This all works great for IE6 and the latest Firefox.

But we recently upgraded to IE8 and now I'm having problems. I've learned that IE8 can block code from changing the status bar value unless it's enabled. Well, it's been enabled. I've found that everything works as expected as long as the JavaScript for the "onmouseover" event is not within the form tags. But if it's within the form tag, the status bar is set to the "window.defaultStatus" and it refuses to set the value. I've verified that the JavaScript if firing just fine, but it refuses to change the status bar! And because I'm using ASP.NET, I have to use the form tags.

Any help is greatly appreciated.

PS. I just noticed more odd behavior. Apparently I can set the "window.defaultStatus" value in this situation, but not the "window.status" value. This might give me a workaround, but I need a method to grab the default value before the onmousover event so I can set it back on the onmouseout event.
May 7 '09 #1
Share this Question
Share on Google+
1 Reply

P: 58
Okay, I do have a workaround, although it's kind of a stupid way to have to do it. Basically, I forget altogether setting the "window.status" variable because it just doens't work. Instead, I always set the "window.defaultStatus" variable. So on the "onmouseover" event, I set the value to what I want in the "window.defaultStatus" variable. But I have to keep track of the original value before the "onmouseover" event and set it back to what it was on the "onmouseout" event. Of course, this also means that any time I change the real "window.defaultStatus" value, I have to go change it all for the "onmouseout" calls.

Stupid, but it works. Thanks for reading.

May 7 '09 #2

Post your reply

Sign in to post your reply or Sign up for a free account.