473,809 Members | 2,757 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 invokeTableCont rol()
{
tablecontrol1.D rawTable();
}
</script>

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

<script type="text/javascript">
function invokeTableCont rol(noofobjects )
{
for (i=0;i<noofobje cts;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,t ablecontrol3,.. ..
thanks
-Eshrath.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 23 '05 #1
1 1729
"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.getEle mentsByTagName( "table");

// theTables is now a loopable array with a length property:
invokeSomeFunct ion(theTables.l ength);

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

invokeSomeOther Function(theTab les[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
3124
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
7589
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 this by relinking the tables and views to use a different DSN. I use the Linked Table Manager > Select All > and tick the 'always prompt for a new location' box, then click OK. It correctly pops up the 'select data source' box, from which I...
4
2058
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 created and not by invoking the original function(i.e delete the part which has the function and then try to invoke the same function by including the object file into my source code). Is this possible?
1
4874
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 function, which in turn fires an event that is caught by the form. The form then need to add a value passed in the event to a form object, however, when using the Invoke method, it just hangs.
0
961
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 direction?
4
4514
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 Smalltalk 6. I haven't had problems consuming other web-services but c# seems to choke with "Collection" return types. The collection (or array) is supposed to contain three instances of a custom object called PsmWsResult, which has two variable...
26
5695
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 several parts of the DOM, but this does not include the window object. Thank you
1
2249
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 executing every 250ms and it generates a display image (using some real time data) and pastes those on the picture box. As the picturebox was generated by main application thread, I used 'control.Invoke()' in the timer function
5
5797
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 which states that MainForm has been disposed when this.Invoke is called...
0
9721
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10635
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10376
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10378
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6881
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5687
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4332
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3013
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.