gradinumcp
IS-IT--Management
Hi there..I have an asp page where I have a SQL statement which is checking if there is a record in the database. There is also a table on this page which has a button with an onclick javascript. What I want to do is that if there is no record in the database, the onclick should go to Function1, if not Function2.
Any clues...
Heres the code:
'Check if record exists in servicing export table
mySQL = "SELECT * FROM ServicingExportFields where loannum='"&request("Loannum")&"'"
Set RecordCounter = Con.Execute( mySQL )
-----------------------------------------------------------
<td><input type="text" name="WareHouseNumber"><input type="button" Name='Stamp' value='Stamp' onclick="Function('value1', 'value2', 'value3');"></td>
-----------------------------------------------------------
<script language="JavaScript1.2"><!--
function Function1(value1, value2, value3){
alert("Record Not Present");
window.open("UpdatePage1.asp?value1="+value1+"&value2="+value2+"&value3="+value3, target="_main");
}
// --></script>
-----------------------------------------------------------
<script language="JavaScript1.2"><!--
function Function2(value1, value2, value3){
alert("Record Present");
window.open("UpdatePage2.asp?value1="+value1+"&value2="+value2+"&value3="+value3, target="_main");
}
// --></script>
Any clues...
Heres the code:
'Check if record exists in servicing export table
mySQL = "SELECT * FROM ServicingExportFields where loannum='"&request("Loannum")&"'"
Set RecordCounter = Con.Execute( mySQL )
-----------------------------------------------------------
<td><input type="text" name="WareHouseNumber"><input type="button" Name='Stamp' value='Stamp' onclick="Function('value1', 'value2', 'value3');"></td>
-----------------------------------------------------------
<script language="JavaScript1.2"><!--
function Function1(value1, value2, value3){
alert("Record Not Present");
window.open("UpdatePage1.asp?value1="+value1+"&value2="+value2+"&value3="+value3, target="_main");
}
// --></script>
-----------------------------------------------------------
<script language="JavaScript1.2"><!--
function Function2(value1, value2, value3){
alert("Record Present");
window.open("UpdatePage2.asp?value1="+value1+"&value2="+value2+"&value3="+value3, target="_main");
}
// --></script>