Script error

Script error

View Answers

October 22, 2008 at 3:08 PM

Hi friend,

<html>

<head>

<title>Permission Restricted</title>
<script src="scripts/blockrclick.js"></script>
<link rel="stylesheet" href="css/form_tools.css" type="text/css">
<meta name="Microsoft Theme" content="sumipntg 011">
<script language="javascript">
<!--
function change()
{
var t1 = setTimeout("document.all.notice.color='#FF0000'",5000);
clearTimeout(t1);
setTimeout(change(),0);
}
//-->
</script>
</head>
<body onload="change()">
<script src="scripts/blockrclick.js"></script>

<table border="1" width="100%">
<tr>
<td width="100%" id="notice">
<p align="center"> <font face="Book Antiqua" color="#CC9900" size="4">
<b>Site can be viewed by only class members</b></font></td>
</tr>
</table>

<form action= "loginAction.jsp" method= "post">
<table border="0" width="100%" frame=border>
<tr>
<td width="30%" rowspan="2">
&nbsp;
<p>
&nbsp;</p>
</td>
<td width="18%">
<b><font face="Terminal" size="3" color="#808080">UserName</font></b></td>
<td width="17%" align="center">
<p align="left"><input type="text" name="username" size="20" tabindex="1" class="text">
</td>
<td width="35%" align="center">
</td>
</tr>
<tr>
<td width="18%">
<p align="left"><b><font face="Terminal" size="3" color="#808080">Password</font></b></td>
<td width="21%" align="center">
<p align="left"><input type="password" name="password" size="20" maxlength="10" tabindex="2" class="text"></p>
</td>
<td width="31%" align="center">
</td>
</tr>
<tr>
<td width="100%" colspan="4" >
<p align="center">
<input type="submit" value="Enter" name="B1" tabindex="3" class="submit"></td>
</tr>
</table>
</form>
</body>

</html>

October 22, 2008 at 3:13 PM

<%@ page language="java" import="java.sql.*" import="java.util.*" %>


<%



String userid = request.getParameter("userid");

String password = request.getParameter("password");



Connection con = null;
String url = "jdbc:mysql://192.168.10.211:3306/";;
String db = "amar";
String driver = "com.mysql.jdbc.Driver";
String userName ="amar";
String pass="amar123";

try {

Class.forName(driver);
con = DriverManager.getConnection(url+db,userName,pass);

Statement st = con.createStatement();

String strQuery = "select * from login where userid='"+userid+"' and password='"+password+"'";

out.println(strQuery);

ResultSet rs = st.executeQuery(strQuery);



while(rs.next()){

if((rs.getString(1).equals("admin")) && (rs.getString(2).equals("admin")))

{

session.setAttribute("userid",userid);

response.sendRedirect("userForm.jsp");
}

else{

response.sendRedirect("loginForm.jsp");

}


}

System.out.println("Connected to the database");

con.close();



} catch (Exception e) {

e.printStackTrace();

}

%>

------------------------------------

If you have any problem then send me jsp code.

Thanks










Related Tutorials/Questions & Answers:
script error - Java Beginners
script error  hi, Is it possiple to use PHP function under the script tag. plz help me. thank u in advance. regards, sakthi  Hi Friend, Yes It is possible to use PHP function under the script Tag. Thanks
Script error - JSP-Servlet
Script error  Hello friends, In my log in page i decided to make a text as blinking one with it's color attribute with the interval... running this it shows an error as "STACK OVERFLOW". Correct the code . The code
Advertisements
Error Handling in Java Script
Error Handling in Java Script  ... will Learn how to handle error in java script. JavaScript is scripting language used for client side scripting. and error are handling in two ways.   *try
how to solve 'Stop Running This Script' Error ?
how to solve 'Stop Running This Script' Error ?  Hi.. When opened the page on IE browser(version : 8.0),it gives an java script error (i.e.Stop Running This Script). I have used jsp/servlet for this. Please help to resolved
Can someone review my script for an apparent parsing error? -it isn't quite finished yet, but I want to fix error first
Can someone review my script for an apparent parsing error? -it isn't quite finished yet, but I want to fix error first   import java.util.Scanner; class historyquiz{ public static void main(String args
Script#
Script#       Script# is a C# compiler and set of frameworks that makes it possible to write Javascript... checking, error reporting, intellisense, refactoring, class browsing, doc-comments etc
Error
Error  Hi. I am getting error in the following code after the line I have commented as ERROR. How to solve this. Thanks in advance. package...;"); out.println("<title></title>"); out.println("<script language
Error
Error  Hi. I am getting error in the following code after the line I have commented as ERROR. How to solve this. Thanks in advance. package...;"); out.println("<title></title>"); out.println("<script language
Error
Error  Hi. I am getting error in the following code after the line I have commented as ERROR. How to solve this. Thanks in advance. package...;"); out.println("<title></title>"); out.println("<script language
Error
Error  Hi. I am getting error in the following code after the line I have commented as ERROR. How to solve this. Thanks in advance. package...;title></title>"); out.println("<script language='javascript
error
error  while iam compiling iam getting expected error
Error-
Error-   Hello, I would like to know about XSD file. I try to print XML file but I am getting error SAXException-- says Content is not allowed in prolog. Please help me
error
error  i have 404 error in my program plz tell me yhe solution about
error
error  i have 404 error in my program plz tell me yhe solution about
error
/ServletUserEnquiryForm.shtml getting an error given below SQLException caught: [Microsoft][ODBC SQL Server Driver]COUNT field incorrect or syntax error please suggest
Error
Error  I have created ajax with php for state and city. When I change state then city will not come in dropdown list and it give me error as 'Unknown Runtime Error'. This error come only in IE browser, but in other brower
error
error  java.lang.unsupportedclassversionerror:bad major version at offset 6 how to solve this????   Hi, Please check the version of framework used and also the JDK version.ADS_TO_REPLACE_1 This type error also comes
error
error
error
error  When I deploye the example I have this message cannot Deploy HelloWorld Deployment Error for module: HelloWorld: Error occurred during deployment: Exception while deploying the app [HelloWorld
error!!!!!!!!!
error!!!!!!!!!   st=con.createStatement(); int a=Integer.parseInt(txttrno.getText()); String b=txttname.getText(); String c=txtfrom.getText(); String d=txtto.getText
error!!!!!!!!!
error!!!!!!!!!   st=con.createStatement(); int a=Integer.parseInt(txttrno.getText()); String b=txttname.getText(); String c=txtfrom.getText(); String d=txtto.getText
error!!!!!!!!!
error!!!!!!!!!   st=con.createStatement(); int a=Integer.parseInt(txttrno.getText()); String b=txttname.getText(); String c=txtfrom.getText(); String d=txtto.getText
error
"+it); } } this is my program i am getting an error saying cannot find symbol class stringADS
error
error  whats the error.............. import java.util.Scanner; public class g { public static void main(String[] args) { Scanner s=new Scanner(System.in); int d,x,y; System.out.println("Enter the first number
ModuleNotFoundError: No module named 'script'
, ModuleNotFoundError: No module named 'script' error will be solved. Thanks...ModuleNotFoundError: No module named 'script'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named
Java script
Java script  Source code for capturing the screen using Java Script
Java Script
Java Script  why we are using java script
script for data
script for data  how to write a simple script to display a selected data from list in flex applicatin?.   Hi Friend, Please visit the following link:ADS_TO_REPLACE_1 Flex Application Thanks
Java Script
Java Script  What is Java Script? How to learn Java Script?   Hi Java Script is client side programming language. It runs on browser.... You can learn Java Script from our JavaScript - JavaScript Tutorial pages
Java Script
Java Script  Hi, Any one please share a code to swap the 2strings using java script
Window Script
Window Script  i want to write windows script can you help me in writing those i want to write script so that it follows below steps Step 1) downloading file from FTP 2) Unzip it 3) Edit it 4) zip it 5) upload again to FTP
java script
java script  how to write a Java script program to enter number in two text fields and then automatically display the total in another text field
Java script
Java script  a java script code for accept 10 numbers from the user and print in the descending order without using sort method
java script
java script  Hi, Any one please tell me how, to store below elements in an array using java script 12,13,14,a,b,xyz
Java Script.
Java Script.  Hi Sir, The below java script code is not working in Google chrome can yo give me the solution as soon as possible. <script type="text/javascript"> function setValue(){ var val=""; var frm
Java Script.
Java Script.  Hi Sir, The below java script code is not working in Google chrome can yo give me the solution as soon as possible. <script type="text/javascript"> function setValue(){ var val=""; var frm
Java Script.
Java Script.  Hi Sir, The below java script code is not working in Google chrome can yo give me the solution as soon as possible. <script type="text/javascript"> function setValue(){ var val=""; var frm
Java Script.
Java Script.  Hi Sir, The below java script code is not working in Google chrome can yo give me the solution as soon as possible. <script type="text/javascript"> function setValue(){ var val=""; var frm
Java Script
Java Script  Hello Sir, Is it possible to select only current date from datetimepicker in struts2 through java script validation. Means when i select.... Try to send me java script validation code for this purpose that user won't
LOGIN ERROR
LOGIN ERROR  ERROR SCRIPT: LOGIN FAILED", $_SESSION['login fail']='0',}?> Ty Team
Java Script.
Java Script.  The below code is nit working in Google chrome can any one tell me the solution as soon as possible. <script type="text/javascript"> <!-- function setValue(){ var val=""; var frm
Java Script.
Java Script.  Hi i want to submit two form using javascript.The below code submitting two forms in server but its not working in browser like chrome and firefox am struggling for many days give me solution as soon as possible
java script
java script  how will you identify whether the number entered by the user has two digits or three digits.Assuming that the user enters only a three digit or two digit number.   <HTML> <HEAD> <SCRIPT
java script
java script  write a java script code which provide a menu for user which will enable him/her to either add or subtract or multiply or divide two numbers and produce the corresponding result.   <html> <
ModuleNotFoundError: No module named 'awesome-script'
'awesome-script' error? Thanks   Hi, In your python... 'awesome-script' error will be solved. Thanks...ModuleNotFoundError: No module named 'awesome-script'  Hi, My
ModuleNotFoundError: No module named 'chatbot_script'
'chatbot_script' error? Thanks   Hi, In your python... 'chatbot_script' error will be solved. Thanks...ModuleNotFoundError: No module named 'chatbot_script'  Hi, My
ModuleNotFoundError: No module named 'gmx-script'
-script' error? Thanks   Hi, In your python environment you...ModuleNotFoundError: No module named 'gmx-script'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named
ModuleNotFoundError: No module named 'hurry-script'
;hurry-script' error? Thanks   Hi, In your python...-script' error will be solved. Thanks...ModuleNotFoundError: No module named 'hurry-script'  Hi, My Python
ModuleNotFoundError: No module named 'layman-script'
'layman-script' error? Thanks   Hi, In your python...;layman-script' error will be solved. Thanks...ModuleNotFoundError: No module named 'layman-script'  Hi, My
ModuleNotFoundError: No module named 'pcart-script'
;pcart-script' error? Thanks   Hi, In your python...-script' error will be solved. Thanks...ModuleNotFoundError: No module named 'pcart-script'  Hi, My Python

Ads