misman2973
Technical User
Hello everyone,
I have the following javascript function in the head of my frmEntry.aspx page:
WHen the "insert" button is clicked:
<input id="btnInsert" type="button" value="Insert" onmouseover="ChangeButton(this);" onmouseout="ChangeButton(this);" onclick="CheckFields();"/>
function CheckFields(){
if(document.frmdocumententry.txtauthor.value==""){
alert("You must enter an Author!"); document.frmdocumententry.txtauthor.focus();
}else{
if(document.frmdocumententry.cmbDept.value==""){
alert("You must select a Department Number!"); document.frmdocumententry.cmbDept.focus();
}else{
//document.frmdocumententry.DoSave('C');
document.frmdocumententry.action="frmConfirm.aspx?CRUD=C";
document.frmdocumententry.submit();
}
}
}
This function is called and does some stuff before the form is submitted to my confirm page that has a case statement for each scenario. I've put the case operation into a "public sub CRUD" in the codebehind of the frmEntry.aspx form.
Public Sub CRUD()
Dim objError As Exception = Nothing
mf.RW(Request.QueryString("C"))
Select Case Request.QueryString("CRUD")
Case "C"....................
Here's the question:
On the following line of my "CheckFields()":
document.frmdocumententry.action="frmConfirm.aspx?CRUD=C";
I want to call the "public sub CRUD" method in the codebehind and specifically state what operation(C, R, U, D etc) Im calling within that method
document.frmdocumententry.action="frmEntry.aspx?Action CRUD(CRUD=C");???????????????????????????????????????
Any recs would be greatly appreciaited.
Thanks in advance.
S
I have the following javascript function in the head of my frmEntry.aspx page:
WHen the "insert" button is clicked:
<input id="btnInsert" type="button" value="Insert" onmouseover="ChangeButton(this);" onmouseout="ChangeButton(this);" onclick="CheckFields();"/>
function CheckFields(){
if(document.frmdocumententry.txtauthor.value==""){
alert("You must enter an Author!"); document.frmdocumententry.txtauthor.focus();
}else{
if(document.frmdocumententry.cmbDept.value==""){
alert("You must select a Department Number!"); document.frmdocumententry.cmbDept.focus();
}else{
//document.frmdocumententry.DoSave('C');
document.frmdocumententry.action="frmConfirm.aspx?CRUD=C";
document.frmdocumententry.submit();
}
}
}
This function is called and does some stuff before the form is submitted to my confirm page that has a case statement for each scenario. I've put the case operation into a "public sub CRUD" in the codebehind of the frmEntry.aspx form.
Public Sub CRUD()
Dim objError As Exception = Nothing
mf.RW(Request.QueryString("C"))
Select Case Request.QueryString("CRUD")
Case "C"....................
Here's the question:
On the following line of my "CheckFields()":
document.frmdocumententry.action="frmConfirm.aspx?CRUD=C";
I want to call the "public sub CRUD" method in the codebehind and specifically state what operation(C, R, U, D etc) Im calling within that method
document.frmdocumententry.action="frmEntry.aspx?Action CRUD(CRUD=C");???????????????????????????????????????
Any recs would be greatly appreciaited.
Thanks in advance.
S