HTML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignHTML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 12th, 2000, 10:12 AM
Dmitry Dmitry is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2000
Location: Atlanta,GA,USA
Posts: 8 Dmitry User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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!

Reply With Quote
  #2  
Old September 13th, 2000, 01:09 PM
RobSchultz RobSchultz is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2000
Posts: 1 RobSchultz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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."

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignHTML Programming > Does NC support "this"?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway