Behavior which modifies status bar

S

sgross

I'm trying to do a simple test of a behavior overriding the windows
status bar on a link to show its text instead of it's href without
passing special variables to the behavior. Please have a look and let
me know if you see anything I'm missing.

<PUBLIC:COMPONENT>
<PUBLIC:ATTACH EVENT="onMouseOver" HANDLER="doMouseOver" />
<SCRIPT LANGUAGE="JavaScript">
function doMouseOver(){
var strRegExp = /&nbsp;/g;
var newString = innerHTML.replace(strRegExp," ")
if(newString.length>1){
window.status = newString;
return true;
}
}
</script>
<PUBLIC:COMPONENT>
 
K

kaeli

sgross2130 said:
I'm trying to do a simple test of a behavior overriding the windows
status bar on a link to show its text instead of it's href without
passing special variables to the behavior. Please have a look and let
me know if you see anything I'm missing.

You're missing the fact that in Opera, Mozilla, and Netscape, I can
specify that your script isn't allowed to change my status bar. ;)


--
 
L

Lasse Reichstein Nielsen

kaeli said:
You're missing the fact that in Opera, Mozilla, and Netscape, I can
specify that your script isn't allowed to change my status bar. ;)

Not a problem. IE "behaviors" won't work in these browsers either,
so the author (hopefully) never intended the script to run on any
of them.

/L
 
L

Laurent Bugnion

Hi,
Is THAT what those odd looking tags were?

Yes. A behaviour is a new concept introduced by Microsoft, allowing to
specify a small JavaScript piece of code (encapsulated in its own file)
as a CSS rule. MS is trying to have it accepted as a standard, but it
should take at least a few more years until we see it widespread. It
works in IE already, though.

Laurent
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top