472,096 Members | 2,285 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,096 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
Jul 21 '05 #1
0 1412

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Julian Hayward | last post: by
reply views Thread by Mircea Pleteriu | last post: by
5 posts views Thread by rn5a | last post: by

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.