469,632 Members | 1,733 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,632 developers. It's quick & easy.

.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 1337

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
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.