|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hello, I have tried to use something like this in NC but it doesn't work:
<script> function go(obj) { alert(obj.id) } </script> ======================================== ... <form> <input id="aa" type=button value="..." onClick='go(this)'> </form> ... Does anyone know the reason why it's failed? I've got "undefined" value. All is fine under IE. Thanks! P.S. One question yet. Does NC support try {} and catch {} operations? |
|
#2
|
|||
|
|||
|
the problem is not THIS, but NS does not support the ID property for all tags, so you have to rely on the built in properties of NS objects. e.g. the NAME property in case of an input button...
<script> function go(obj) alert(obj.name) } </script> ======================================== ... <form> <input name="aa" type=button value="..." onClick='go(this)'> </form> ... works for both IE & NS... btw. CATCH and TRY are not supported in JavaScript... |
|
#3
|
|||
|
|||
|
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>btw. CATCH and TRY are not supported in JavaScript...[/quote]
Errr, actually as off Javascript 1.4 it IS supported. However the current browsers mostly support Javascript 1.2 or 1.3. The Netscape Enterprise Server 4.0 currently supports Javascript 1.4 for serverside scripting. I think that NS will use Javascript 1.4 for there version 6 browser. Bas [This message has been edited by MeijdenB (edited September 15, 2000).] |
![]() |
| Viewing: Dev Shed Forums > Web Design > HTML Programming > Does NC support "this"? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|