Link to home
Start Free TrialLog in
Avatar of dkim18
dkim18

asked on

window status bar works in dev environment, but not working test environment

Hi,

As my question title, window.status is not working test environment. Of course, the function that contains this line does work fine.

......
......
window.status ="test test"
....
....

thanks,

p.s.
Does this have something to do with web server? This is RoR app and I have weBrick for dev and apache server + mongrel for test.
SOLUTION
Avatar of Joe Wu
Joe Wu
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
If you have firefox , go tools check error console.

I aggree with nizsmo that window.status code is part of javascript, hence it is dependent on Client browser not the sever.
May be there some javascript error of previous code which is preventing your code to run.
Avatar of dkim18
dkim18

ASKER

nizsmo,

I am using same browser (IE) and dev works fine, but test (from remote server) is not working.

Maverick_Cool,

I checked error console, but there was no error.
dkim18,

In some browsers (e.g. Firefox) Javascript's ability to change status itself can be disabled.  Have you tested a page on another server or site to see if you see the status message?  In Firefox this is controlled in the setting at Tools -> Options -> Content -> Advanced button to the right of the Enable Javascript checkbox -> Change Status bar text setting.  If that box isn't checked then Javascript won't be able to change the status, even if Javascript is enabled.

I agree with the general comments above though.  This is most likely not server related unless the server is removing the javascript.  Checking the browser html source should quickly let you know if this is happening.  The cause is most likely in the browser if the code is fine.

Let me know if you have any questions or need more information.

b0lsc0tt
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dkim18

ASKER

b0lsc0tt,

I followed your instruction and windows status displays fine in firefox, but it is not showing on IE. So this means that there is no code error.
Avatar of dkim18

ASKER

I even grabbed the source code from the browser(test site) and created html file and it works just fine in my local machine.
What version of IE?  When you say you ran the html on your local machine what was the "content zone"?  Down in the bottom, right of IE did it show Internet, intranet, local or something else?  What was the protocol (i.e. in address bar, http:, file:, etc)?

If the page was run on showed in the browser as intranet or local content then the security rules for the browser will be different than an Internet page.  Do you have a webserver on your local machine (e.g. IIS) or access to a different web server to test the html as an Internet page?  What is the result?

Since the issue didn't occur in Firefox the code is probably OK but it still is a possible cause.  IE has sometimes not reported Javascript errors in the past for me so I don't trust it much.  Hopefully the content zone will be the issue but otherwise we will probably start needing to look at html.

What do you see in the status bar when you use IE to go to http://www.w3schools.com/js/tryit.asp?filename=tryjs_statusbar ?

Let me know if you have a question or need more info.

bol
Avatar of dkim18

ASKER

The test server is my old machine and it is windows 2000 with IE (6.0) and guess what? It was working there. So, IE(7.0) on my local machine doesn't work.

from the source:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <meta http-equiv="content-type" content="text/html;charset=UTF-8" />



>>What do you see in the status bar when you use IE to go to http://www.w3schools.com/js/tryit.asp?filename=tryjs_statusbar ?

It only displays "Done" on the status bar.
OK.  That (the test of going to the w3schools page) confirms the issue is something with your IE browser blocking the script.  If other script works then it is just blocking select parts or just window.status.

Do you have any addons, etc installed?  Try disabling or removing them to see if one is a conflict.  I don't have quick, easy access to IE7 but check in its preferences/settings, especially the security or content area, for a setting that might have to do with window.status.

Did you do the tests for other browsers on the same computer?  If not then try another browser on the same computer.  If those don't work either the cause is probably some program but not one tied to just IE.

The piece of "source" code you posted, that isn't all the html is it?  That little snippet doesn't really help.  It would still be nice to know how you run the file on your "local" computer but if that computer and browser could not see the status when going to the w3schools page then it doesn't really matter.  That was the important test.

Confirm that you tried other browsers on that same local computer with the problem and IE7.  Then let me know about the addons, etc.  If you can't find a setting then I will see what I can do to look for one.  I doubt it is something IE7 won't support so it is probably just a security setting.  Keep in mind this might be something disabled by default (Firefox comes that way I believe) so you might want to make sure the status message isn't important or appears in some other form.  More and more users are disabling it because of its potential for abuse and because the "message" sites show is usually just convenient, not essential.

Let me know if you have a question.

bol
Can you see your status bar:
Check if the status bar is ticked
From the menu click on
View --> Status Bar
Avatar of dkim18

ASKER

b0lsc0tt,

I disabled all Add-ons, but still have the problem. I tested it on IE7 in other machine and same problem. Actully, this is session timer that indicates how much time left. (so, this is ticking clock)

gops1,

yes, i can see the status bar is ticked.
Avatar of dkim18

ASKER

Ok, I added this line

<iframe id="sessionPing" style="width:0px; height:0px; border: 0px" ></iframe>

and it is working on IE7 ONLY when I access the web app locally(accessing dev version that is located in my local machine). Strange enough, the web app in remote server still doesn't display (on IE7 from my local machine) status bar and they are same identical code...

So, I am using same IE7 and it is working when I access the web app in my local machine, but is not working when I access the web app in remote server and there is no code difference.

hm....strange
It isn't just your code.  Remember you couldn't see the status on the w3schools page either (unless I misunderstood something).  I haven't had a chance to play with IE7 yet but what about another browser on the same computer.  Did it have the same problem?

Since you had the same issue on another IE7 browser (did it also have the problem with the w3schools page too?) then that gives us a little more info.  It is either a general IE7 issue or something in common on those 2 computers.

Let me know if you have a question or the results of the questions above.

bol
Avatar of dkim18

ASKER

http://www.w3schools.com/js/tryit.asp?filename=tryjs_statusbar

this didn't work on IE7 nor firefox in my machine. I have tested with someone else's machine and IE7 didn't work either.
Avatar of dkim18

ASKER

hm....then why it worked when IE7 in my local machine accessed the web app locally...
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dkim18

ASKER

Finally, I found solution:

Status Bar Scripting--Scripts will no longer be able to set the status bar text through the window.status and window.defaultStatus methods by default in the Internet and Restricted Zones. This helps prevent attackers from leveraging those methods to spoof the status bar. To revert to previous behavior and allow scripts to set the status bar through window.status and window.defaultStatus, follow these steps:

   1. Open Internet Explorer, click the Tools button, click Internet Options, and then click the Security tab.
   2. Click Internet or Restricted sites, and then click the Custom level button.
   3. Scroll down to Allow status bar updates via script, select Enable.
   4. Click OK until you return to Internet Explorer.


I will give you points anyway...
Thanks!!!
Your welcome!  I'm glad you found a source for it.  It confirms what I said above.  It is actually a good thing in my opinion, the status area was just getting abused and in some bad ways.  Not worth the little benefit it provided. :)

Nice to see the steps in IE7 to reverse it if a user wants to do so in their browser.

Thanks for the grade, the points and the fun question.

bol

p.s.  Please post the link to the page you quoted if you can.  It is important to give credit for content on other sites and the link will probably be useful to others in the future.