Programming error
Place.jsp code
<%@page import="java.sql.*"%>
<%@page import="java.io.*"%>
<%@page import="java.lang.String.*" %>
<%
Connection con=null;
Statement stmt=null;
String st;
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:Advdsn");
stmt=con.createStatement();
}
catch(SQLException se)
{
out.println("Database Error:"+se.getMessage());
}
catch(Exception e)
{
e.toString();
}
%>
<html>
<head>
<script language="JavaScript">
function func(){
var filename = document.form.img.value;
var st=document.form.State.value;
var ci=document.form.City.value;
var main=document.form.mainCat.value;
var sub=document.form.subCat.value;
var title=document.form.Title.value;
var ad=document.form.DraftAd.value;
var cnt=document.form.Count.value;
var email=document.form.Email.value;
var pno=document.form.PhoneNo.value;
var np=document.form.NewsPaper.value;
var date=document.form.date.value;
var mon=document.form.Month.value;
var year=document.form.Year.value;
var day=document.form.Days.value;
window.location.href=("http://localhost:8080/ProjectAd/Preview.jsp?filename="+filename+"&st="+st+"&ci="+ci+"&main="+main+"&sub="+sub+"&title="+title+"&ad="+ad+"&cnt="+cnt+"&email="+email+"&pno="+pno+"&np="+np+"&date="+date+"&mon="+mon+"&year="+year+"&day="+day);
}
function Draft()
{
document.form.Count.value = document.form.DraftAd.value.split(' ').length;
}
</script>
</head>
<body bgcolor="lightblue">
<marquee behavior="alternate" scrollamount=5 scrolldelay=10><h1><font size=4 face="Stroustroup" color="#993355">Advertisement Management System</h1></font></marquee><br>
<p align=center><b> <font color="669933" size=4>Create Ad </font></b></p><br>
<form name="form" >
<table>
<tr><td>State:</td><td> <select name="State" size=1>
<option value="Maharashtra">Maharashtra</option>
<option value="UttarPradesh">UttarPradesh</option>
</select></td></tr>
<tr><td>City:</td><td> <select name="City" size=1>
<option value="Mumbai">Mumbai</option>
<option value="Pune">Pune</option>
<option value="Bareilly">Bareilly</option>
<option value="Lucknow">Lucknow</option>
</select></td></tr>
<tr><td>Main Category: </td><td><select name="mainCat" size=1>
<option value="A">A</option>
<option value="B">B</option>
</select></td></tr>
<tr><td>Sub Category:</td><td><select name="subCat" size=1>
<option value="A1">A1</option>
<option value="A2">A2</option>
<option value="B1">B1</option>
<option value="B2">B2</option>
</select></td></tr>
<tr><td>Title:</td><td> <input type=text name="Title" size=25 ></td></tr>
<tr><td>Draft Your Ad here:</td><td><textarea name="DraftAd" cols="15" rows="2" onkeyup="Draft();"></textarea></td></tr>
<tr><td>No of words:</td><td><input name="Count" type="text" value="" ></td></tr>
<tr><td>Image:</td><td><input type="file" name="img"></td></tr>
<tr><td>Email:</td><td><input type=text name="Email" size=25></td></tr>
<tr><td>Phone No:</td><td><input type=text name="PhoneNo" size=25></td></tr>
<tr><td>Select Newspaper:</td><td><select name="NewsPaper" size=1>
<option value="Times of India">Times of India</option>
<option value="Hindustan Times">Hindustan Times</option>
</select></td></tr>
<br>
<tr><td>Select Your Date:</td><td><select name="date" size=1>
<%for (int date=1;date<=31;date++)
{
%>
<option value="<%=date%>"><%=date%></option>
<%}%>
</select></td></tr>
<tr><td>Month:</td><td><select name="Month" size=1>
<%
for (int month=1;month<=12;month++){
%>
<option value="<%=month%>"><%=month%></option>
<%}%>
</select></td></tr>
<tr><td>Year:</td><td><select name="Year" size=1>
<%
for (int year=2010;year<=2050;year++){
%>
<option value="<%=year%>"><%=year%></option>
<%}%>
</select></td></tr>
<tr><td>Select Number of Days:</td><td><input type=text name="Days" size=5></td></tr>
<tr><td><input type=button name=submit value=Preview onClick="func();"></td></tr>
</form>
</body>
</html>
Preview Code:
<%@page language="java" import="java.io.* ,java.sql.* "%>
<HTML>
<HEAD>
<TITLE> Preview </TITLE>
<script language="JavaScript">
function insert(){
var filename = document.form.img.value;
var st=document.form.State.value;
var ci=document.form.City.value;
var main=document.form.mainCat.value;
var sub=document.form.subCat.value;
var title=document.form.Title.value;
var ad=document.form.DraftAd.value;
var cnt=document.form.Count.value;
var email=document.form.Email.value;
var pno=document.form.PhoneNo.value;
var np=document.form.NewsPaper.value;
var dt=document.form.date.value;
var mon=document.form.Month.value;
var year=document.form.Year.value;
var day=document.form.Days.value;
window.location.href=("http://localhost:8080/ProjectAd/save.jsp?filename="+filename+"&st="+st+"&ci="+ci+"&main="+main+"&sub="+sub+"&title="+title+"&ad="+ad+"&cnt="+cnt+"&email="+email+"&pno="+pno+"&np="+np+"&dt="+dt+"&mon="+mon+"&year="+year+"&day="+day);
}
</script>
</HEAD>
<BODY BGCOLOR="lightblue">
<p align=center><font size=5 color=Green>Preview</font></p><br>
<%
String title=request.getParameter("title");
out.println("<p align=left>Title:"+title+"</p>");
String f=request.getParameter("filename");
out.println("<img align=left src='"+f+"' height=150 width=150 /></img><br>");
String np=request.getParameter("np");
out.println(np+"<br>");
String dt=request.getParameter("date");
out.println("Date:"+dt+"-");
String mth=request.getParameter("mon");
out.println(mth+"-");
String y=request.getParameter("year");
out.println(y+"<br>");
String days=request.getParameter("day");
out.println("No.of.Days:"+days+"<br>");
//out.println("<center>");
String da=request.getParameter("ad");
out.println("<p align=center>Text:"+da+"<br>");
String count=request.getParameter("cnt");
out.println("Words: "+count+"<br>");
String st=request.getParameter("st");
out.println("State:"+st+"<br>");
String ct=request.getParameter("ci");
out.println("City:"+ct+"<br>");
String mc=request.getParameter("main");
out.println("MainCategory:"+mc+"<br>");
String sc=request.getParameter("sub");
out.println("SubCategory:"+sc+"<br>");
String email=request.getParameter("email");
out.println("Email:"+email+"<br>");
String pno=request.getParameter("pno");
out.println("PhoneNo:"+pno+"<br>");
//out.println("</center>");
%>
<hr color=green>
<p align=center><input type="button" name="c" value="Save" onClick="insert();">
</BODY>
</HTML>
save Code:
<%@page import="java.sql.*"%>
<%@page import="java.io.*"%>
<%
String st=request.getParameter("st");
String ct=request.getParameter("ci");
String main=request.getParameter("main");
String sub=request.getParameter("sub");
String title=request.getParameter("title");
String da=request.getParameter("ad");
String count=request.getParameter("cnt");
String f=request.getParameter("filename");
String email=request.getParameter("email");
String pno=request.getParameter("pno");
String np=request.getParameter("np");
String dt=request.getParameter("dt");
String mth=request.getParameter("mon");
String y=request.getParameter("year");
String days=request.getParameter("day");
File file=new File(f);
FileInputStream in=new FileInputStream(file);
System.out.println(dt+" "+mth+" "+y);
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection("jdbc:odbc:Advdsn");
PreparedStatement ps = con.prepareStatement("INSERT INTO Image(State,City,MainCategory,SubCategory,Title,DraftAd,Count,image,Email,PhoneNo,Newspaper,Day,Month,Year,Days) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
ps.setString(1,st);
ps.setString(2,ct);
ps.setString(3,main);
ps.setString(4,sub);
ps.setString(5,title);
ps.setString(6,da);
ps.setInt(7,Integer.parseInt(count));
ps.setBinaryStream(8,in,(int)file.length());
ps.setString(9,email);
ps.setString(10,pno);
ps.setString(11,np);
ps.setInt(12,Integer.parseInt(dt));
ps.setInt(13,Integer.parseInt(mth));
ps.setInt(14,Integer.parseInt(y));
ps.setInt(15,Integer.parseInt(days));
int x=ps.executeUpdate();
if(x>0)
out.println("Data is saved successfully");
else
response.sendRedirect("PlaceAd.jsp");
ps.close();
%>
<a href="http://localhost:8080/ProjectAd/Payment.jsp">Payment</a>
This is not working properly.
i mean when user clicks on preview it should get previewed nd thn when it clicks on save then it should get saved in database:but its not getting saved How to do this please reply me ???
thank you sir.
View Answers
February 8, 2010 at 3:35 PM
Hi Friend,
We have create a table PlaceAd in the access database which is having following fields:
1)State (Text)
2)City (Text)
3)MainCategory (Text)
4)SubCategory (Text)
5)Title (Text)
6)DraftAd (Text)
7)Count (Number)
8)Image (OLE Object)
9)Email (Text)
10)PhoneNo (Number)
Newspaper (Text)
day (Number)
Month (Number)
Year (Number)
Days (Number)
1)Place.jsp:
<%@page import="java.sql.*"%>
<%@page import="java.io.*"%>
<%
Connection con=null;
Statement stmt=null;
String st;
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:access");
stmt=con.createStatement();
}
catch(SQLException se){
out.println("Database Error:"+se.getMessage());
}
catch(Exception e){
e.toString();
}
%>
<html>
<head>
<script language="JavaScript">
function Draft(text1,text2){
var v1=text1.value;
var v = 0;
v2=v1.replace(/\s/g,' ');
v2=v2.split(' ');
for (i=0; i<v2.length; i++) {if (v2[i].length > 0) v++;}
text2.value=v;
}
function checkPhoneNo(num){
if(isNaN(num)){alert("Invalid Phone Number. The only characters permitted are 0 to 9"); return 0;}
else{return 1;}
}
function Validate()
{
var phone=document.form.PhoneNo;
var email=document.form.Email;
if(email.value=="")
{ alert("Please enter valid Email Id");
return false;
}
apos=email.value.indexOf("@")
dotpos=email.value.lastIndexOf(".")
if (apos<1 || dotpos-apos<2)
{
alert("Invalid Email Id")
email.value=="";
email.focus();
return false;
}
if((phone.value=="")||(phone.value==null))
{ alert("Please enter valid PhoneNo");phone.focus();
return false;
}
if (checkPhoneNo(phone.value)==false){
phone.value="";
phone.focus();
return false;
}
if ((phone.value.length==8)||(phone.value.length==10)){
return true;
}
else{
alert("Phone Number must be of 8 numbers or 10 numbers");
return false;
}
return true;
}
</script>
</head>
February 8, 2010 at 3:38 PM
continue..
<body bgcolor="lightblue">
<marquee behavior="alternate" scrollamount=5 scrolldelay=10><h1><font size=4 face="Stroustroup" color="#993355">Advertisement Management System</h1></font></marquee><br>
<p align=center><b> <font color="669933" size=4>Create Ad </font></b></p><br>
<form name="form" method="post" action="Preview.jsp" onsubmit="return Validate();">
<table>
<tr><td>State:</td><td> <select name="State" size=1>
<option value="Maharashtra">Maharashtra</option>
<option value="UttarPradesh">UttarPradesh</option>
</select></td></tr>
<tr><td>City:</td><td> <select name="City" size=1>
<option value="Mumbai">Mumbai</option>
<option value="Pune">Pune</option>
<option value="Bareilly">Bareilly</option>
<option value="Lucknow">Lucknow</option>
</select></td></tr>
<tr><td>Main Category: </td><td><select name="mainCat" size=1>
<option value="A">A</option>
<option value="B">B</option>
</select></td></tr>
<tr><td>Sub Category:</td><td><select name="subCat" size=1>
<option value="A1">A1</option>
<option value="A2">A2</option>
<option value="B1">B1</option>
<option value="B2">B2</option>
</select></td></tr>
<tr><td>Title:</td><td> <input type=text name="Title" size=25 ></td></tr>
<tr><td>Draft Your Ad here:</td><td><textarea name="DraftAd" cols="15" rows="2" onkeyup="Draft(this,document.form.Count)"></textarea></td></tr>
<tr><td>No of words:</td><td><input name="Count" type="text" value="0" onkeyup="Draft(document.form.DraftAd,this)" ></td></tr>
<tr><td>Image:</td><td><input type="file" name="img"></td></tr>
<tr><td>Email:</td><td><input type=text name="Email" size=25></td></tr>
<tr><td>Phone No:</td><td><input type=text name="PhoneNo" size=25 maxlength=10></td></tr>
<tr><td>Select Newspaper:</td><td><select name="NewsPaper" size=1>
<option value="Times of India">Times of India</option>
<option value="Hindustan Times">Hindustan Times</option>
</select></td></tr>
<br>
<tr><td>Select Your Date:</td><td><select name="day" size=1>
<%for (int date=1;date<=31;date++)
{
%>
<option value="<%=date%>"><%=date%></option>
<%}%>
</select></td></tr>
<tr><td>Month:</td><td><select name="Month" size=1>
<%
for (int month=1;month<=12;month++){
%>
<option value="<%=month%>"><%=month%></option>
<%}%>
</select></td></tr>
<tr><td>Year:</td><td><select name="Year" size=1>
<%
for (int year=2010;year<=2050;year++){
%>
<option value="<%=year%>"><%=year%></option>
<%}%>
</select></td></tr>
<tr><td>Select Number of Days:</td><td><input type=text name="numDays" size=5></td></tr>
<tr><td><input type="submit" name="submit" value="Preview"></td></tr>
</form>
</body>
</html>
February 8, 2010 at 3:40 PM
continue..
2)Preview.jsp:
<%@page language="java" import="java.io.* ,java.sql.* "%>
<HTML>
<HEAD>
<TITLE> Preview </TITLE>
</HEAD>
<BODY BGCOLOR="lightblue">
<p align=center><font size=5 color=Green>Preview</font></p><br>
<%
String title=request.getParameter("Title");
String f=request.getParameter("img");
String dt=request.getParameter("day");
String np=request.getParameter("NewsPaper");
String mth=request.getParameter("Month");
String y=request.getParameter("Year");
String ndays=request.getParameter("numDays");
String da=request.getParameter("DraftAd");
String count=request.getParameter("Count");
String st=request.getParameter("State");
String ct=request.getParameter("City");
String mc=request.getParameter("mainCat");
String sc=request.getParameter("subCat");
String email=request.getParameter("Email");
String pno=request.getParameter("PhoneNo");
out.println("<p align=left>Title:"+title+"</p>");
out.println("<img align=left src='"+f+"' height=150 width=150 /></img><br>");
out.println(np+"<br>");
out.println("Date:"+dt+"-");
out.println(mth+"-");
out.println(y+"<br>");
out.println("No.of.Days:"+ndays+"<br>");
out.println("<p align=center>Text:"+da+"<br>");
out.println("Words: "+count+"<br>");
out.println("State:"+st+"<br>");
out.println("City:"+ct+"<br>");
out.println("MainCategory:"+mc+"<br>");
out.println("SubCategory:"+sc+"<br>");
out.println("Email:"+email+"<br>");
out.println("PhoneNo:"+pno+"<br>");
%>
<hr color=green>
<p align=center>
<form name="form" action="saves.jsp">
<input type="submit" name="submit" value="Save" >
<input type="hidden" name="st" value="<%=st%>">
<input type="hidden" name="ci" value="<%=ct%>">
<input type="hidden" name="main" value="<%=mc%>">
<input type="hidden" name="sub" value="<%=sc%>">
<input type="hidden" name="title" value="<%=title%>">
<input type="hidden" name="ad" value="<%=da%>">
<input type="hidden" name="cnt" value="<%=count%>">
<input type="hidden" name="filename" value="<%=f%>">
<input type="hidden" name="email" value="<%=email%>">
<input type="hidden" name="pno" value="<%=pno%>">
<input type="hidden" name="np" value="<%=np%>">
<input type="hidden" name="day" value="<%=dt%>">
<input type="hidden" name="mon" value="<%=mth%>">
<input type="hidden" name="year" value="<%=y%>">
<input type="hidden" name="days" value="<%=ndays%>">
</form>
</BODY>
</HTML>
February 8, 2010 at 3:41 PM
continue..
3)saves.jsp:
<%@page import="java.sql.*"%>
<%@page import="java.io.*"%>
<%
String st=request.getParameter("st");
String ct=request.getParameter("ci");
String main=request.getParameter("main");
String sub=request.getParameter("sub");
String title=request.getParameter("title");
String da=request.getParameter("ad");
String count=request.getParameter("cnt");
String f=request.getParameter("filename");
String email=request.getParameter("email");
String pno=request.getParameter("pno");
String np=request.getParameter("np");
String dt=request.getParameter("day");
String mth=request.getParameter("mon");
String y=request.getParameter("year");
String days=request.getParameter("days");
File file=new File(f);
FileInputStream in=new FileInputStream(file);
System.out.println(dt+" "+mth+" "+y);
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection("jdbc:odbc:access");
PreparedStatement ps = con.prepareStatement("INSERT INTO PlaceAd(State,City,MainCategory,SubCategory,Title,DraftAd,Count,Image,Email,PhoneNo,Newspaper,day,Month,Year,Days) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
ps.setString(1,st);
ps.setString(2,ct);
ps.setString(3,main);
ps.setString(4,sub);
ps.setString(5,title);
ps.setString(6,da);
ps.setInt(7,Integer.parseInt(count));
ps.setBinaryStream(8,in,(int)file.length());
ps.setString(9,email);
ps.setInt(10,Integer.parseInt(pno));
ps.setString(11,np);
ps.setInt(12,Integer.parseInt(dt));
ps.setInt(13,Integer.parseInt(mth));
ps.setInt(14,Integer.parseInt(y));
ps.setInt(15,Integer.parseInt(days));
ps.execute();
ps.close();
out.println("Data is saved successfully");
%>
<a href="
http://localhost:8080/ProjectAd/Payment.jsp">Payment</a>;
Thanks
Related Tutorials/Questions & Answers:
programming errorprogramming error I got an
error when i did the following program
the prg. is to "select the name from database when the age is given for the respective name"
error i got is:SQL exception
please give me the solution by providing
error at programmingerror at programming import javax.servlet.http.*;
import javax.servlet.*;
import java.io.*;
import java.sql.*;
public class Login extends HttpServlet
{
public void doPost(HttpServletRequest req,HttpServletResponse res
Advertisements
error at programmingerror at programming import javax.servlet.http.*;
import javax.servlet.*;
import java.io.*;
import java.sql.*;
public class Login extends HttpServlet
{
public void doPost(HttpServletRequest req,HttpServletResponse res
error at programmingerror at programming import javax.servlet.http.*;
import javax.servlet.*;
import java.io.*;
import java.sql.*;
public class Login extends HttpServlet
{
public void doPost(HttpServletRequest req,HttpServletResponse res
error at programmingerror at programming import javax.servlet.http.*;
import javax.servlet.*;
import java.io.*;
import java.sql.*;
public class Login extends HttpServlet
{
public void doPost(HttpServletRequest req,HttpServletResponse res
error at programmingerror at programming import javax.servlet.http.*;
import javax.servlet.*;
import java.io.*;
import java.sql.*;
public class Login extends HttpServlet
{
public void doPost(HttpServletRequest req,HttpServletResponse res
error at programmingerror at programming import javax.servlet.http.*;
import javax.servlet.*;
import java.io.*;
import java.sql.*;
public class Login extends HttpServlet
{
public void doPost(HttpServletRequest req,HttpServletResponse res
error at programmingerror at programming import javax.servlet.http.*;
import javax.servlet.*;
import java.io.*;
import java.sql.*;
public class Login extends HttpServlet
{
public void doPost(HttpServletRequest req,HttpServletResponse res
error at programmingerror at programming import javax.servlet.http.*;
import javax.servlet.*;
import java.io.*;
import java.sql.*;
public class Login extends HttpServlet
{
public void doPost(HttpServletRequest req,HttpServletResponse res
error at programmingerror at programming <p>import javax.servlet.http.*;
import javax.servlet.*;
import java.io.*;
import java.sql.*;</p>
<p>public class Login extends HttpServlet
{
public void doPost(HttpServletRequest
Programming Error - JSP-ServletProgramming Error Hello Sir,
how to convert a txt written in textarea of html must get converted to integers and should get displayed... integer.parseInt but its giving
error.
Please Reply me .
Thank you
Programming Error - JSP-ServletProgramming Error
Place Ad
function funct(){
if(document.form.DraftAd.value=="" || document.form.DraftAd.value==null... ??? And when i tried its giving me
error than cannot find variable.In
Programming Error - JSP-ServletProgramming Error Hello Sir,
import java.util.*;
import...();
}
}
}//End of class
m geeting
error in this can u please tell me whats the
error nd how to solve
Programming error - JDBCProgramming error import javax.servlet.*;
import...)
{
out.println("Database
Error :"+se.getMessage());
}
catch(Exception e)
{
out.println(e.toString());
}
}
}
Please reply me the
error in this program because i
programming error - Java Beginnersprogramming error how can we statically implement linked list???????? Hi Friend,
Please visit the following links:
http://www.roseindia.net/java/jdk6/LinkedListExample.shtml
http://www.roseindia.net/java
Programming error - JSP-ServletProgramming error Actually there is an
error in placeorder.jsp file where there are 5 fields OrderNo ,Name , Address, Email, PhoneNo
where if I delete an order of client based on orderno then suppose in database if there are 5
Programming Error - JSP-ServletProgramming Error
Place Order
function checkName...("");
}
catch(SQLException se)
{
out.println("Database
Error :"+se.getMessage());
}
catch(Exception e)
{
out.println("General
Error :"+e.getMessage
Programming error - JSP-ServletProgramming error Register.jsp
Registration...");
}
catch(SQLException se)
{
out.println("Database
Error :"+se.getMessage());
}
catch(Exception e)
{
out.println("General
Error :"+e.getMessage());
}
%>
programming error - Java Beginnersprogramming error import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
public class Place_Ad extends...(SQLException se)
{
out.println("Database
Error :"+se.getMessage());
}
catch(Exception e
programming error - Java Beginnersprogramming error What is
error in this page and how to use RequestDispatcher in servlet to validate it please do reply??
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.sql.*;
import
Programming error - JSP-ServletProgramming error
--%>
Place Order
function Validate()
{
var valid=true;
if(document.forms.OrderNo.value=="")
{ alert... where if @ is not given or (dot). is not given etc then it should display
error Programming error - JSP-ServletProgramming error Hello Sir,
Can u please reply me the code for javamail please actually i watch the javamail.net but i dint understood it.
Actually i want to send a mail to my clients with a small text message.
Please
Programming Error - JSP-ServletProgramming Error Image:
I want that when user clicks on browse button then a folder of images should get open and when user clicks one image from it (only one not more than that)then it should get displayed on next page
Programming Error - JSP-ServletProgramming Error
Place Ad
function funct(){
if(document.form.DraftAd.value=="" || document.form.DraftAd.value==null)
{
document.form.cnt.value=0;}
else
{document.form.cnt.value
Programming Error - JSP-ServletProgramming Error
Payment
Advertisement Management System
Payment
Premium Position
FrontPage
BackPage
Other Premium Pages
Page 2
Page 3
Page 5
Page 7
Total Cost:
How to use switch
Programming Error - JSP-ServletProgramming Error Image:
Browse
When user clicks on Browse Button then a folder of images should get open and when user clicks one of them then the path of that should get saved in Access Database and on next page
Programming error - JSP-ServletProgramming error
Payment
Advertisement Management System
Payment
Premium Position
FrontPage
BackPage
Other Premium Pages
Page 2
Page 3
Page 5
Page 7
Total Cost:
I want that the no of characters
Programming Error - JSP-ServletProgramming Error
function Draft()
{
if(document.form.Count.value==""||document.form.Count.value==null)
document.form.Count.value=0;
else
document.form.Count.value = document.form.DraftAd.value.split(' ').length
Programming Error - JSP-ServletProgramming Error How to validate login page using jsp where it checks for username whether it is empty or not or is it including number or not if it is the paste alert message.
Hi Friend,
Try the following
Programming Error - JSP-ServletProgramming Error
Place Ad
Advertisement Management System
Create Ad
State:
City:
Main Category:
Sub Category:
Title:
Draft Your Ad Here
Programming Error - JSP-ServletProgramming Error Ya States and cities and maincategory and subcategory are combobox and maincategory contains suppose matrimonial then sub category will contain groom and bride,
if main category contains vehicals then sub
Programming Error - JSP-ServletProgramming Error
MainPage
body
{
font-family:arial,helvitica,serif;
color:purple;
background-color:#717D7D;
}
ul
{
list-style-type:none;
margin:0;
padding:4px;
}
li
{
list-style-type:none;
padding
Programming Error - JSP-ServletProgramming Error Domain Table:--
Rfcdkey DomainName DomainValue DepDomainValue Statcd
1 StateCd Maharashtra Mumbai A
2 StateCd Maharashtra Pune A
3 StateCd Maharashtra Nashik A
4
Programming Error - JSP-ServletProgramming Error Place.jsp
function func(){
var filename = document.form.img.value;
var st=document.form.State.value;
var ci=document.form.City.value;
var main=document.form.mainCat.value;
var sub
Programming error - JSP-ServletProgramming error
Place Order
function checkName(text)
{
if(isNaN(text)){ return 1;}
else{alert("Invalid Name! The only charachters accepted are A - Z and a - z");return 0;}
}
function checkPhoneNumber
programming error - JSP-Servletprogramming error
Place Order
function Validate()
{
var valid=true;
if(document.forms.OrderNo.value=="")
{ alert("Please enter valid OrderNo");
valid=false;
}
if(document.forms.Name.value
Programming Error - JSP-ServletProgramming Error
Place Ad
Advertisement Management System
State:
City:
Main Category:
Sub Category:
Title:
Draft Your Ad Here:
Count:
Image
Another Image
Email:
Phone No:
Select Newspaper
Programming Error - JSP-ServletProgramming Error import java.util.*;
import javax.mail.*;
import javax.mail.internet.*;
public class SendMail {
public static void main(String args[]) throws Exception {
String host = "192.168.10.205
Programming Error - JSP-ServletProgramming Error
Place Ad
function func()
{
var filename = document.form.img.value;
window.location.href=("http://localhost:8080/ProjectAd/Preview?
filename="+filename);
}
function Draft
Programming error - Java BeginnersProgramming error import javax.servlet.RequestDispatcher;
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
public class ModuleServlet extends HttpServlet {
public void doGet(HttpServletRequest
Programming error - JSP-ServletProgramming error Place.jsp code
function func(){
var filename = document.form.img.value;
var st=document.form.State.value;
var ci=document.form.City.value;
var main=document.form.mainCat.value;
var sub
Programming Error - JSP-ServletProgramming Error import javax.servlet.*;
import java.io.*;
import javax.servlet.http.*;
import java.sql.*;
public class UpdateOrd extends HttpServlet
{
public void doPost(HttpServletRequest req,
HttpServletResponse
ProgrammingProgramming Given a number n, write a
programming to determine its square root if it is possible, in the contraly case print an appropriate massege on the screen
programming Java Constructor
programming for single and double constructor write a program which have no argument constructor ,single parameter constructor constructor,double parameter constor,and the now when we create a object
errorerror 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
errorerror i have 404
error in my program plz tell me yhe solution about
errorerror 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
ErrorError 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