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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

javascript does not work with IE 7!

Status
Not open for further replies.

lcs01

Programmer
Aug 2, 2006
182
US
My company's homepage is created by a perl code (let's call it 'home.pl'). A piece of html code created by home.pl is list below:

Code:
function tOver() {
  self.status='Expand this tree';
  return true;
}

<a onmouseover="return tOver()" 
  onmouseout="return tOut()" href="#" 
  onclick="showMenu(80);return false">
  <img name="i80" align="middle" border="0" src="/images/plus.gif" />
</a>

So, if you put your mouse on the gif (plus.gif), you would see a string 'Expand this tree' on the lower left cornor of your IE. And it works on IE 6. However, on IE 7, when you put your mouse on the same gif, you would see 'home.pl' instead of 'Expand this tree'.

Can someone please tell me why tOver() stops working with IE 7? I know how to fix it. But I don't understand why it is not working with IE 7. And it is very important for me to figure out why it is not working, for we are having tons of problems with IE 7, because my company's pages are using javascript extensively. And now most of those pages are behaving funky.

Thank you for your help.
 
This is not a javascript issue, it is an IE7 issue. For quite some time now most browsers have disabled the ability (by default) to let others modify the status bar via script. I primarily use firefox and it blocks script from modifying my status bar by default. This is an option that I can choose to enable or disable. This will likely be the standard for all new web browsers, so it is best to just accept it. Consider it off-limits the same way changing other settings on a user's computer would be.

I don't personally have IE7 but after doing a quick google search it turned up a site that shows how to disable this setting in IE7:
Code:
Tools/Internet Options.../Security tab/Choose Internet Zone and Custom Level... button/Scripting category/Allow status bar update via script

Unless you can convince ALL of your users to select this option you are out of luck. As I stated above, it's best just to accept the fact that it's unmodifiable now because it's not likely to change.

-kaht

[small](All puppies have now found loving homes, thanks for all who showed interest)[/small]
 
Instead of using the status bar for that, why don't you use the alt (tooltip) attribute. It's easier, and it's what people expect.

Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
to clarify on Tracy's suggestion:

use the "alt" attribute of the image tag. if you want this "tooltip"-like text to appear with other elements, use the "title" attribute.



*cLFlaVA
----------------------------
[tt]"quote goes here"[/tt]
[URL unfurl="true"]http://www.coryarthus.com/[/url]
 
Thanks, Cory, That's what I meant.

Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
Thank you, Tracy and cLFlaVA. I'll suggest that. They were done way for many years and I am new here.

To kaht, Thank you so much. That worked!

However, my company's pages still have tons of problems with IE 7. For example, a tree structured list doesn't start out collapsed as expected under IE6.

Any advices?
 
are your pages using CSS? i am running IE7 & it seems to like this better when using javascript.

i am in the process of re-doing my small websites to CSS because of the problems IE6 has with javascript & security settings.

Firefox also seems to like CSS better than IE6.

then again i am a noobe to CSS, a novice @ javascript, and i still like Frames!
 
nothing.
but it seems security updates have made previous javascript usage less end-user friendly.

then again i am a noobe to CSS, a novice @ javascript, and i still like Frames!
 
eyec,

Yes, our pages are using css heavily and we do have lots of problems with ie7. But I'll worry about this later. I need to working on the tree structure collapse thing first and I'll start a new thread.

Hope you could help me on my new questions. Thank you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top