|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
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! |
|
#2
|
|||
|
|||
|
Try this. I haven't had a chance to test this with NN 4 but it does work with NN 6 (but then so did your code). I simply added the .id to the function call.
<html> <script language="javascript"> function go(objID){ alert(objID); } </script> </html> <body> <form> <input id="aa" type=button value="..." onClick='go(this.id)'> </form> </body> </html> Later, ------------------ Rob "Focus on the solution to the problem, not the obstacles in the way." |
![]() |
| Viewing: Dev Shed Forums > Web Design > HTML Programming > Does NC support "this"? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|