473,395 Members | 1,975 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

How to get the object ids of all the tables and use them to invoke a function of the object.


Hi,

I have a requirement where I am creating table object with different
ids using XSL by taking an XML as input. The no of objects (tables) is
not fixed. I want to write a javascript to invoke all these objects. I
can pass the number of objects (Tables) available in the documents as a
parameter to the javascript function. Can you please tell me how to
invoke all those objects.

Basically these objects are nothing but a active X controls writte
in .Net. I need to get the object ids of these objects and invoke a
function of the object. The function name is DrawTable().

I am just stating the example for one object, the object name is
'tablecontrol1' and the javascript I have written is

<script type="text/javascript">
function invokeTableControl()
{
tablecontrol1.DrawTable();
}
</script>

I want to write a generalized script to invoke all the objects
(tables) in the document.

<script type="text/javascript">
function invokeTableControl(noofobjects)
{
for (i=0;i<noofobjects;i++)
{
// but i donno what to write here. any ptrs to
//this would be helpful.
}
}
</script>

I donno how to invoke all the other objects. In the XSL I would be
giving the ids of the tables as tablecontrol1,
tablecontrol2,tablecontrol3,....
thanks
-Eshrath.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 23 '05 #1
1 1699
"Eshrath Ali Khan" <es*****@gmail.com> skrev i meddelandet
news:41**********************@news.newsgroups.ws.. .

Hi,

I have a requirement where I am creating table object with different
ids using XSL by taking an XML as input. The no of objects (tables) is
not fixed. I want to write a javascript to invoke all these objects. I
can pass the number of objects (Tables) available in the documents as a
parameter to the javascript function. Can you please tell me how to
invoke all those objects.

<snip>

Use DOM. Like this (add checks for browser's DOM compatibility):

var theTables = document.getElementsByTagName("table");

// theTables is now a loopable array with a length property:
invokeSomeFunction(theTables.length);

for(var i = 0, max = theTables.length; i < max; i++){

invokeSomeOtherFunction(theTables[i].id);
}

Joakim Braun
Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: gulu man | last post by:
Hi, What is the substitute for COM objects in .NET? How can I create something similar to com in .net? Is it still possible? Thank you
6
by: Lewis Veale | last post by:
I have an Access 2000 front-end pointing at a SQL Server backend, with around 80 linked tables and views. I frequently need to point the front-end at different versions of the back-end, and achieve...
4
by: veereshai | last post by:
i want to copy the functions from my source file into a new file...and convert each function into a new object file by compiling it. now, i want to invoke the function using the object file i have...
1
by: boxim | last post by:
hi all, I'm having a few problems whereby my application is hanging when using the Invoke method of a form's control. Basically, when a user clicks a button on the form, it calls a remote...
0
by: Hans ter Wal via DotNetMonster.com | last post by:
Hi My problem is as follow i'm trying to get a sqlDatareader object back from my shared function by means of reflection. But sadly i'm getting an error: Can anyone steer me in the right...
4
by: hellrazor | last post by:
Hi there, I'm trying to consume a web-service that is supposed to return a collection of a custom object. The web-service was not created with C# or VS.net. It was created with IBM VisualAge...
26
by: yb | last post by:
Hi, Is there a standard for the global 'window' object in browsers? For example, it supports methods such as setInterval and clearInterval, and several others. I know that w3c standardized...
1
by: Amit Dedhia | last post by:
Hi I am having problem working with Timers in C++/CLI (the .NET version of C++) I have an application which has several forms with pictureBox controls on it. There is a background timer...
5
by: aine_canby | last post by:
Hi, The problem is that the line - this.Invoke(new MyDelegate(Function), args); // this = MainForm is being called after the line - terminatePopulate = true; therefore I get an exception...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.