Thank you Andy.
I'm not that good with Javascript and I hope that I can get some help
here, this is what I have:
I created a Web User Control with the following:
Button1 (just in case I can not call the function directly)
Button2 (just in case I can not call the function directly)
Label1 (to display the status of my connection)
Connect (Function called when you 'click' on Button1)
Disconnect (Function called when you 'click' on Button2)
I placed my control in a ASPX page, with two HTML buttons:
<cc1:im_cicwebcontrol id="IM_CICWebControl1" ...
Button1 (calls a Javascript funtion (Connect))
Button2 (Calls a Javascript function (Disconnect))
When I run the ASPX page and 'view source' the page, I only see my
HTML buttons and my control items but with a different name:
for Button1 --> IM_CICWebControl1_Button1
for Button2 --> IM_CICWebControl1_Button2
for Label1 --> IM_CICWebControl1_Label1
I tried to call it like this in my javascript
:
var myObj = document.Form1;
alert (myObj.id);
myObj.IM_CICWebControl1_Button1; (does not work)
myObj.IM_CICWebControl1_Button1.Click; (does not work)
myObj.IM_CICWebControl1_Button1.Button1_Click; (does not work)
It does not work and I can not call also the functions...
Any Ideas???
Thanks
Ant
"Andy Fish" <aj****@blueyonder.co.uk> wrote in message news:<ub**************@TK2MSFTNGP15.phx.gbl>...
yes
you just need to invoke a postback from javascript - you basically simulate
a click on a hidden button or something (google for details on how to do
this).
"Ant" <am*****@bigfoot.com> wrote in message
news:5b**************************@posting.google.c om... I'm building a Web user control that has several public functions. Can
I fire them from the client side? for example Javascript and an HTML
button