LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-29-2004, 01:11 PM   #1
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Costa Rica
Distribution: Kubuntu, Debian, Knoppix
Posts: 2,092
Blog Entries: 1

Rep: Reputation: 90
How can I tell one DYNAMIC object to do a method in javascript?


Don't think I'm talking about normal static stuff.

I create a dynamic TR object in a javascript function... I want to tell it to use another javascript function when It's clicked.

I tried this:

Code:
		newRow.onClick="agregarPersona(this, " +id + ")";
newRow is a new TD object I created before (using aTable.addRow() method)
id is a local variable to the function actually running.... it didn't work. So... what do you think?

Last edited by eantoranz; 10-29-2004 at 01:25 PM.
 
Old 10-29-2004, 01:20 PM   #2
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Costa Rica
Distribution: Kubuntu, Debian, Knoppix
Posts: 2,092

Original Poster
Blog Entries: 1

Rep: Reputation: 90
Found something:

I can say:
Code:
     newRow.onClick=agregarPersona
However, I have to pass the function "agregarPersona" two arguments (the instance of the TR object and the local variable id). How can I do that?
 
  


Reply



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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Javascript error "is null or not an object" apt Programming 2 03-28-2005 06:14 AM
Does HashMap.get(Object) use the method equals? eantoranz Programming 10 12-03-2004 07:05 PM
Event driven object-to-object: C++ template class mecanism ( NOT STL or STDC++) bretzeltux Programming 2 12-23-2003 02:45 PM
Perl undefined subroutine /can't locate object method cobien Programming 1 11-17-2003 10:47 AM
Can't locate object method "splitpath" via package "File::Spec" RobJohnston Linux - General 2 06-28-2003 09:59 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration