C
Carl tam
Hi everyone,
I got a quite interesting problem myself and got stuck.
I have an aspx page with a windows user control with it.
in the Windows Control. I have a RaiseEvent statement,
say OnClearAlarm, and tell the computer to RaiseEvent when
I click on the Panel.
in the webpage, I first load the user control, and then
have a javascript function to handle the event:
Form1.ClickMe::OnClearAlarm(), and inside the function, I
just call a new window for testing.
But somehow it just won't work correctly. Can someone
help me out here.
Carl
Code for Windows UserControl:
Public Event OnClearAlarm()
Private Sub Panel1_Click(ByVal sender As Object, ByVal
e As System.EventArgs) Handles Panel1.Click
RaiseEvent OnClearAlarm()
End Sub
Code for Web Page:
<form id="Form1" method="post" runat="server">
<OBJECT id="ClickMe" height="350" width="350"
classid="ClickMe.dll#ClickMe.UserControl1"
VIEWASTEXT></OBJECT>
<script language =javascript>
function
Form1.ClickMe::OnClearAlarm() {
alert("fggh");
newWindow = window.open
('MasterDetail.aspx');
newWindow.focus()
}
</script>
</form>
I got a quite interesting problem myself and got stuck.
I have an aspx page with a windows user control with it.
in the Windows Control. I have a RaiseEvent statement,
say OnClearAlarm, and tell the computer to RaiseEvent when
I click on the Panel.
in the webpage, I first load the user control, and then
have a javascript function to handle the event:
Form1.ClickMe::OnClearAlarm(), and inside the function, I
just call a new window for testing.
But somehow it just won't work correctly. Can someone
help me out here.
Carl
Code for Windows UserControl:
Public Event OnClearAlarm()
Private Sub Panel1_Click(ByVal sender As Object, ByVal
e As System.EventArgs) Handles Panel1.Click
RaiseEvent OnClearAlarm()
End Sub
Code for Web Page:
<form id="Form1" method="post" runat="server">
<OBJECT id="ClickMe" height="350" width="350"
classid="ClickMe.dll#ClickMe.UserControl1"
VIEWASTEXT></OBJECT>
<script language =javascript>
function
Form1.ClickMe::OnClearAlarm() {
alert("fggh");
newWindow = window.open
('MasterDetail.aspx');
newWindow.focus()
}
</script>
</form>