tags:

views:

57

answers:

1

hi this is my first attempt at JavaScript:

the following function is used to display window status bar messages. it works fine on the local machine but when i upload it too the server the messages are not displayed at all.

what am i doing wrong? please help.

[website][link removed]

function displayMsg(msg){

window.status = msg;

}

what should happen is when you hover over the image it should display a message to click it and the image is then updated.

i saw this but if this is no longer possible then why does it work locally?

EDIT: thank you for your answer. i am wondering if it is possible to display a tooltip once the image over event happens? thanks,

EDIT: i have added a Title attribute and it seems to display a tooltip. what you are seeing would be most welcome input. thanks.

EDIT: Google Chrome works fine. Safari does not run javascript. im on win7.

+6  A: 

window.status has been disabled in most (if not all) browsers for security reasons (it was possible to fake a different location for links that way).

See e.g. the MDC page on window.status:

This property does not work in default configuration of Firefox and some other browsers: setting window.status has no effect on the text displayed in the status bar. To allow scripts change the the status bar text, the user must set the dom.disable_window_status_change preference to false in the about:config screen.

it was also removed in IE 7.

As to why it works locally, I can't say. Maybe security restrictions are more relaxed there, although it's strange!

Unicron
Yes, I read this also, still does not explain why it works on the OPs local domain.
Anders
@Anders yes, that is strange. The MDC page gives no indication. @iKurtz what browser are you testing this with? If it's IE, I could imagine local pages are in the "Trusted" or "Local" zone and it works there.
Unicron
yes im using IE8.
iEisenhower
@Unicron, Here is MSDN http://msdn.microsoft.com/en-us/library/ms534648.aspx , feels like the security zone guess is spot on.
Anders