Hi all...the following bit of code has been causing me immense grief and I would be very grateful for any assistance I can get with this. Im basically trying to go back to a page called rfqTestsender after the code below remove an unwanted record from the db. After executing the code, I thought that because it went into the html form, it would read that on the load event, it should go to the javascript function "submitter" which should send the output back to the rfqTestsender page. All I get when I come to this page is a blan screen, even though it does remove the unwanted item from the db. If anyone can help I would be most grateful!
Ashraf
*****************CODE BEGINS****************************
<%@ page import="java.sql.*,
java.net.URLEncoder,
java.net.URLDecoder,
java.text.DecimalFormat,
java.util.*"%>
<html>
<head>
<script language="javascript">
function submitter(daform){
alert("HELLO!"
daform.submit();
}
</script>
</head>
<body>
<%
String avRFQ_NUMBER = request.getParameter("RFQ_NUMBER"
System.out.println(avRFQ_NUMBER);
String remove = request.getParameter("REMOVE"
String avRFQ_LINE = request.getParameter("RFQ_LINE"
System.out.println(avRFQ_LINE);
String avTEAM = request.getParameter("TEAM"
System.out.println(avTEAM);
String avSTARTDATE = request.getParameter("STARTDATE"
String avCODE = request.getParameter("PLANT_CODE"
String avREQUESTOR = request.getParameter("REQUESTOR"
String avAUTHORIZED = request.getParameter("AUTHBUYER"
System.out.println(avSTARTDATE);
String avFAX_NUMBER = request.getParameter("FAX"
String avPHONE = request.getParameter("PHONE"
String avADDRESS = request.getParameter("ADDRESS"
String avQTY = request.getParameter("QTY"
String avCUST_RFQ = request.getParameter("CUST_RFQ"
String avEMAIL = request.getParameter(""
String avNAME = request.getParameter("PLANT_NAME"
String avGEDESC = request.getParameter("GEDESC"
String avCUSTDESC = request.getParameter("CUSTDESC"
String avPURCHASEOPTION = request.getParameter("PRICETYPE"
String avLEADTIME = request.getParameter("LEADTIME"
String avPRIORITY = request.getParameter("PRIORITY"
String avREQUESTDATE = request.getParameter("REQDATE"
String avSAFETYCLASS = request.getParameter("SAFETY"
String avOPTION = request.getParameter("OPTION"
Connection conn = null;
Statement stmt3; //= null;
Statement stmt4;
int rsRemove;
int rsInsert;
try
{
Class.forName("weblogic.jdbc.oci.Driver".newInstance();
}
catch(Exception e)
{
System.out.println("problem with the JDBC driver: " + e);
}
try
{
conn = DriverManager.getConnection("jdbc:weblogicracle:engdev", "GE156MAC", "comet"
String SQLremove = "delete from eng.comtcustrfq where RFQ_NUMBER=" + avRFQ_NUMBER +
" AND RFQ_LINE=" + remove;
stmt3 = conn.createStatement();
rsRemove = stmt3.executeUpdate(SQLremove);
stmt3.close();
//response.sendRedirect("rfqsendTester.jsp?Del=true"
}
catch(SQLException e)
{
System.out.println("<hr>An error occurred: " + e);
}
finally
{
try
{
conn.close();
}
catch(SQLException e)
{
System.out.println("<hr>An error occurred: " + e);
}
} // end finally
%>
<form name="delete" method="post" action="rfqSendTester.jsp" onLoad="javascript:submitter(document.delete)">
<input type="hidden" name="RFQ_NUMBER" value="<%= avRFQ_NUMBER %>">
<input type="hidden" name="RFQ_LINE" value="<%= avRFQ_LINE %>">
<input type="hidden" name="TEAM" value="<%= avTEAM %>">
<input type="hidden" name="PLANT_NAME" value="<%= avNAME %>">
<input type="hidden" name="PLANT_CODE" value="<%= avCODE %>">
<input type="hidden" name="REQUESTOR" value="<%= avREQUESTOR %>">
<input type="hidden" name="AUTHBUYER" value="<%= avAUTHORIZED %>">
<input type="hidden" name="STARTDATE" value="<%= avSTARTDATE%>">
<input type="hidden" name="FAX" value="<%= avFAX_NUMBER%>">
<input type="hidden" name="PHONE" value="<%= avPHONE%>">
<input type="hidden" name="AUTHBUYER" value="<%= avAUTHORIZED %>">
<input type="hidden" name="ADDRESS" value="<%= avADDRESS%>">
<input type="hidden" name="QTY" value="<%= avQTY%>">
<input type="hidden" name="CUST_RFQ" value="<%= avCUST_RFQ%>">
<input type="hidden" name="EMAIL" value="<%= avEMAIL%>">
<input type="hidden" name="AUTHBUYER" value="<%= avAUTHORIZED %>">
<input type="hidden" name="GEDESC" value="<%= avGEDESC%>">
<input type="hidden" name="CUSTDESC" value="<%= avCUSTDESC%>">
<input type="hidden" name="PRICETYPE" value="<%= avPURCHASEOPTION%>">
<input type="hidden" name="LEADTIME" value="<%= avLEADTIME%>">
<input type="hidden" name="PRIORITY" value="<%= avPRIORITY%>">
<input type="hidden" name="REQDATE" value="<%= avREQUESTDATE%>">
<input type="hidden" name="SAFETY" value="<%= avSAFETYCLASS%>">
<input type="hidden" name="OPTION" value="<%= avOPTION%>">
</body>
</html>
<%
System.out.println("Whats up?"
//response.sendRedirect("rfqsendTester.jsp?Del=true"
%>
********************CODE ENDS******************************
Ashraf
*****************CODE BEGINS****************************
<%@ page import="java.sql.*,
java.net.URLEncoder,
java.net.URLDecoder,
java.text.DecimalFormat,
java.util.*"%>
<html>
<head>
<script language="javascript">
function submitter(daform){
alert("HELLO!"
daform.submit();
}
</script>
</head>
<body>
<%
String avRFQ_NUMBER = request.getParameter("RFQ_NUMBER"
System.out.println(avRFQ_NUMBER);
String remove = request.getParameter("REMOVE"
String avRFQ_LINE = request.getParameter("RFQ_LINE"
System.out.println(avRFQ_LINE);
String avTEAM = request.getParameter("TEAM"
System.out.println(avTEAM);
String avSTARTDATE = request.getParameter("STARTDATE"
String avCODE = request.getParameter("PLANT_CODE"
String avREQUESTOR = request.getParameter("REQUESTOR"
String avAUTHORIZED = request.getParameter("AUTHBUYER"
System.out.println(avSTARTDATE);
String avFAX_NUMBER = request.getParameter("FAX"
String avPHONE = request.getParameter("PHONE"
String avADDRESS = request.getParameter("ADDRESS"
String avQTY = request.getParameter("QTY"
String avCUST_RFQ = request.getParameter("CUST_RFQ"
String avEMAIL = request.getParameter(""
String avNAME = request.getParameter("PLANT_NAME"
String avGEDESC = request.getParameter("GEDESC"
String avCUSTDESC = request.getParameter("CUSTDESC"
String avPURCHASEOPTION = request.getParameter("PRICETYPE"
String avLEADTIME = request.getParameter("LEADTIME"
String avPRIORITY = request.getParameter("PRIORITY"
String avREQUESTDATE = request.getParameter("REQDATE"
String avSAFETYCLASS = request.getParameter("SAFETY"
String avOPTION = request.getParameter("OPTION"
Connection conn = null;
Statement stmt3; //= null;
Statement stmt4;
int rsRemove;
int rsInsert;
try
{
Class.forName("weblogic.jdbc.oci.Driver".newInstance();
}
catch(Exception e)
{
System.out.println("problem with the JDBC driver: " + e);
}
try
{
conn = DriverManager.getConnection("jdbc:weblogicracle:engdev", "GE156MAC", "comet"
String SQLremove = "delete from eng.comtcustrfq where RFQ_NUMBER=" + avRFQ_NUMBER +
" AND RFQ_LINE=" + remove;
stmt3 = conn.createStatement();
rsRemove = stmt3.executeUpdate(SQLremove);
stmt3.close();
//response.sendRedirect("rfqsendTester.jsp?Del=true"
}
catch(SQLException e)
{
System.out.println("<hr>An error occurred: " + e);
}
finally
{
try
{
conn.close();
}
catch(SQLException e)
{
System.out.println("<hr>An error occurred: " + e);
}
} // end finally
%>
<form name="delete" method="post" action="rfqSendTester.jsp" onLoad="javascript:submitter(document.delete)">
<input type="hidden" name="RFQ_NUMBER" value="<%= avRFQ_NUMBER %>">
<input type="hidden" name="RFQ_LINE" value="<%= avRFQ_LINE %>">
<input type="hidden" name="TEAM" value="<%= avTEAM %>">
<input type="hidden" name="PLANT_NAME" value="<%= avNAME %>">
<input type="hidden" name="PLANT_CODE" value="<%= avCODE %>">
<input type="hidden" name="REQUESTOR" value="<%= avREQUESTOR %>">
<input type="hidden" name="AUTHBUYER" value="<%= avAUTHORIZED %>">
<input type="hidden" name="STARTDATE" value="<%= avSTARTDATE%>">
<input type="hidden" name="FAX" value="<%= avFAX_NUMBER%>">
<input type="hidden" name="PHONE" value="<%= avPHONE%>">
<input type="hidden" name="AUTHBUYER" value="<%= avAUTHORIZED %>">
<input type="hidden" name="ADDRESS" value="<%= avADDRESS%>">
<input type="hidden" name="QTY" value="<%= avQTY%>">
<input type="hidden" name="CUST_RFQ" value="<%= avCUST_RFQ%>">
<input type="hidden" name="EMAIL" value="<%= avEMAIL%>">
<input type="hidden" name="AUTHBUYER" value="<%= avAUTHORIZED %>">
<input type="hidden" name="GEDESC" value="<%= avGEDESC%>">
<input type="hidden" name="CUSTDESC" value="<%= avCUSTDESC%>">
<input type="hidden" name="PRICETYPE" value="<%= avPURCHASEOPTION%>">
<input type="hidden" name="LEADTIME" value="<%= avLEADTIME%>">
<input type="hidden" name="PRIORITY" value="<%= avPRIORITY%>">
<input type="hidden" name="REQDATE" value="<%= avREQUESTDATE%>">
<input type="hidden" name="SAFETY" value="<%= avSAFETYCLASS%>">
<input type="hidden" name="OPTION" value="<%= avOPTION%>">
</body>
</html>
<%
System.out.println("Whats up?"
//response.sendRedirect("rfqsendTester.jsp?Del=true"
%>
********************CODE ENDS******************************