473,386 Members | 1,798 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,386 software developers and data experts.

.NET control event with java script handler

Hi all,

I have created a .NET Windows control with c#.
I have placed the control on a HTML page within the OBJECT element.
Everything works fine up to now.

Now, I wanna implement the following stuff that the control must support.

The control must provide a method called InvokeJavaScriptFunction
The prototype of this method is:

InvokeJavaScriptFunction(<point to java script function>)

where <point to java script function> is a pointer to an existing java
script function in the HTML page.

The InvokeJavaScriptFunction method of the control is invoked within the
HTML page when the page is loading

<head>
<script language="javascript">
function MyJScriptFunction()
{
....
}
</script>
<OBJECT id="MyControl" .....>
</OBJECT>
</head>
<body onLoad="MyControl.InvokeJavaScriptFunction(MyJScri ptFunction)">
......
</body>

Inside the control.... the InvokeJavaScriptFunction is performing some stuff
and after that it should invoke the java script function on the page.
In other words, the InvokeJavaScriptFunction takes some actions and then it
must turn back the control on the page invoking the script function.
You can think at this like to an event.. the InvokeJavaScriptFunction is
doing its job and then fires an event on the page, where the handler of the
event is the provided java script function.

Do you have any idea how to implement this must have functionality of my
control?

Thanks,
Mircea
Nov 18 '05 #1
0 971

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

Similar topics

10
by: tony kulik | last post by:
This code works fine in ie and opera but not at all in Mozilla. Anybody got a clue as to how to get it right? <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <script...
0
by: Mircea Pleteriu | last post by:
Hi all, I have created a .NET Windows control with c#. I have placed the control on a HTML page within the OBJECT element. Everything works fine up to now. Now, I wanna implement the...
2
by: Julian Hayward | last post by:
I recently "inherited" a project which involves an applet on a web page, and some Javascript event handling functions. The handler definition looks like this: <SCRIPT LANGUAGE=javascript...
5
by: Dan | last post by:
Hi, I'd like to find out the control that caused a postback to be raised. Obviously this could simply done in a control event handler. I am not going to do this method and would like no...
4
by: Remi Hugnon | last post by:
Hi, I want to build an expandable treeview. I saw some code on VB but I know only C# I plan for my class that each nodes has its own id (using span for example). Into a single aspx page...
4
by: Paul | last post by:
Hi I have a page that pops up a warning box if a selection is not made, see below. <script language="javascript" event="onclick" for="btn_submit"> if(document.Form1.drp_dn_arriv.selectedIndex==0)...
10
by: Sean Dockery | last post by:
I have the following HTML file that I've been using for testing... <html> <head> <script type="text/javascript"> <!-- function handleWindowLoad() { var items = ; for (var i = 0; i < 11; i++)...
2
by: glenn | last post by:
Hi folks, I am trying to determine which item in a DropDownList Web control has been selected. I have posted an OnSelectedIndexChanged subroutine in my code with a reference to the subroutine...
5
by: rn5a | last post by:
Consider the following user control which resides in Address.ascx: <script runat="server"> Public Property Address() As String Get Address = txtAddress.Text End Get Set(ByVal value As String)...
1
by: tdan | last post by:
I do not know how to get Event.stopObserving() to work in the context I am using it. I am displaying a Color Selection Table and attaching 2 events: 1. onmouseover to display the color to the user...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...

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.