Lee hu kiteb:
[color=blue]
> Lee said:
>[color=green]
>> The "this" keyword works in the context of a function, but in
>> that context, it refers to the window, unless that function
>> is a function handler. That's true in IE and Netscape.[/color]
>
> That last line should begin "is an event handler."[/color]
This is what i have now...
function Sho(ref) {
var moo = ref.parentElement.id;
// broken under mozilla
alert( moo );
// show other
// var suFFix = (/_ok/i.test( moo.slice(-3) )) ? '_no' :'_ok';
// document.getElementById(moo.slice(0,-3)+suFFix).style.display =
'block';
// hide self
ref.parentElement.style.display='none';
return null;
}
-
<DIV ID="1_ok" CLASS="mufti">
<A HREF="javascript
:Xejn()" onclick="Sho(this)">text</A></DIV>
<DIV ID="1_no">
<A HREF="javascript
:Xejn()" onclick="Sho(this)">text</A></DIV>
-
I have a feeling netscape cant find the parent element id because the
actual referring element (this) has no id specifically assigned. Am I on
the right track?
--
--
Fabian
Visit my website often and for long periods!
http://www.lajzar.co.uk