cesark
Programmer
- Dec 20, 2003
- 621
I want to call a subroutine from a javascript function. How can I do it? I am trying to do it thus: (But it doesn’ t work)
The form control that triggers the js function:
And a piece of the Subroutine:
Thank you,
Cesar
Code:
function check_State(eventTarget, eventArgument) {
if (document.form_newOffer.states.value != "0") {
var theform;
if (window.navigator.appName.toLowerCase().indexOf("netscape") > -1) {
theform = document.forms["form_newOffer"];
} else {
theform = document.form_newOffer;
}
theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit();
}
}
The form control that triggers the js function:
Code:
<asp:dropdownlist ID="product" onChange="check_State(' Certificates ','')" runat="server" CssClass="letter1"></asp:dropdownlist>
And a piece of the Subroutine:
Code:
Sub Certificates(sender As Object, E As EventArgs)
If states.SelectedItem.Value <> "0" Then
Dim CmdCert AS New SqlCommand("sel_CertAuto", strConnection)
CmdCert.CommandType = CommandType.StoredProcedure
...
Thank you,
Cesar