vicneswaran boi

Greenhorn
+ Follow
since Sep 06, 2004
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by vicneswaran boi

if( !(vec.size() == 0)&& message.equals("")) {
errorMsg += "<LI>Please type in your message.";



this is my validateing procces ..Wat it does is that if no one writes anything in the text box and submits the error msg above should appear but in my case it does not. why is this so.
13 years ago
JSP
I mean whenever i click the refresh button i end up at the login page each time... How do i solve this problem.


Thank u.
13 years ago
JSP
hi all
while we refreshing the JSP page after we login, it is automatically logout to the primary page, we call it Indexframe.jsp. how we can solve this problem??

thanks for ur help
Vic
13 years ago
JSP
if( (!mHp1.equals(""))&((mHp1.length() !=8)||(mHp1.charAt(0) !='9'+!='8'))) {
errorMsg += "<LI>Please check the handphone.";


)||(mHp1.charAt(0) !='9'+!='8'))) {

here how we can check the initial charectors 9 or 8. we need to identify the charectors using the charAt(0), is the above way to do this??? it is working for one digit example for 9 we can just check for 9,,but how to do it for multiple numbers???

Thanks for the help
Vic
13 years ago
Thanks for your reply .... but my logout still does not logout on the same page .... when clicked the logout should redirect me to the login page but in my case the login page pops out....How is this possible and how do i solve it please ...Thks


<HTML>
<HEAD>
</HEAD>

<BODY >
<%

session.invalidate();
pageContext.forward("Login.jsp");


%>

</BODY>
13 years ago
JSP
jsp
Thanks for your reply .... but my logout still does not logout on the same page .... when clicked the logout should redirect me to the login page but in my case the login page pops out....How is this possible and how do i solve it please ...Thks


<HTML>
<HEAD>
</HEAD>

<BODY >
<%

session.invalidate();
pageContext.forward("Login.jsp");


%>

</BODY>
13 years ago
JSP
jsp
WAt is wrong with my login page.... when clicked the logout button another login page pops out....and i am unable to close the current pages. i am able to click the back button and i will be brought back to the pages i am viewing.....I dont want this to happen i am not sure abt the codes.

this is the codes...

<HTML>
<HEAD>
</HEAD>

<BODY >
<%

session.invalidate();
response.sendRedirect("Login.jsp");
out.flush();

%>

</BODY>



Thank u very much
13 years ago
JSP
What is the statement to execute update.

ResultSet columns = statement.executeUpdate("SELECT * FROM Member");
I did the execute update but i seem to find this error....

incompatible types
found : int
required: java.sql.ResultSet
ResultSet columns = statement.executeUpdate("Delete FROM Member WHERE Pid ="+ id); ^


Thank you in advance
13 years ago
JSP
Hi..

I have a problem in selection.meaning that whenever i select a topic from a dropdown list, i want all those details related to that topic to be retrieved from my database and not eveything. i tried using the below but it seem give me the same topic for instance "ARTS" each time around.I dont know wheater it is a problem with my sql statement or the select statement in the drop down list.

Sql statement--
ResultSet columns = statement.executeQuery("SELECT * FROM Member WHERE D LIKE 'ARTS'");


Select statement--
<select name="section" size="1" language="javascript" onChange="gotoPage(this.selectedIndex);">
<option>ARTS</option>
<option>Soccer</option>
<option>Public Relations</option>
</select></p>
</form>
</form>
<String A = session.getParameter("section");>
<script language="JavaScript">
<!--
function gotoPage(varItem)
{
switch(varItem)
{
case 0:
I1.location="http://127.0.0.1:8080/examples/jsp/myjsp/TECC/View3.jsp";
break;
case 1:
I1.location="http://127.0.0.1:8080/examples/jsp/myjsp/TECC/View3.jsp";
break;
case 2:
I1.location="http://127.0.0.1:8080/examples/jsp/myjsp/TECC/View3.jsp";
break;

}
}
// -->
</script>
13 years ago
JSP
Thank you very much for your help and I will bear your advice in mind
13 years ago
JSP
I want to capture data retrieved from the database and edit it. To do so i want to transfer it in to a textfield.This is the code , so where do i edit.Thank you very much.
<HTML>
<%@ page import = "java.sql.*" %>
<%@ page import = "java.util.*" %>
<HEAD>
</HEAD>
<BODY><P><H2>Confirmation of Deletion </H2>
<TABLE BORDER=1 WIDTH="700" CELLPADDING=3 CELLSPACING=1>
<TR><TD>ID</TD>
<TD>NAME</TD>
<TD>HANDPHONE NO</TD>
<TD>GROUP</TD>
</TR>
<FORM ACTION="editcomm1.jsp" METHOD="POST">
<%
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection connection = DriverManager.getConnection("jdbc dbc atabase","","");
Statement statement = connection.createStatement();
int id = Integer.parseInt(request.getParameter("Id"));
ResultSet columns = statement.executeQuery("SELECT * FROM View where ID ="+ id);
while (columns.next())
{
int Id = columns.getInt("ID");
String Name = columns.getString("Name");
String CName = columns.getString("CName");
String Dimension = columns.getString("Dimension");
%>

<TR>
<TD><%=Id%></TD>
<TD><%=Name%></TD>
<TD><%=CName%></TD>
<TD><%=Dimension%></TD>
<INPUT TYPE="HIDDEN" name="Id" value=<%=id%>>
<TD><INPUT TYPE=Submit VALUE="YES"></TD></TR>
</FORM>
<FORM ACTION="Delete5.jsp" METHOD="POST">
<TD><INPUT TYPE=Submit VALUE="NO"></TD></TR>
</FORM>
<% }
columns.close(); statement.close(); connection.close();
%>
</TABLE>
</BODY>
</HTML>
13 years ago
JSP
When ever i compile this code i receive the error "no result set".
I do not understand this error>
Thank u for your help
<HTML>
<%@ page import = "java.sql.*" %>
<%@ page import = "java.util.*" %>
<HEAD>
</HEAD>
<BODY><P><H2>Confirmation of Deletion </H2>
<TABLE BORDER=1 WIDTH="700" CELLPADDING=3 CELLSPACING=1>
<TR>
<TD>ID</TD>
<TD>Committee_Name</TD>
<TD>Commitee_Full</TD>
<TD>Description</TD></TR>
<FORM ACTION="Delete8.jsp" METHOD="POST">
<%
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection connection = DriverManager.getConnection("jdbc dbc atabase","","");
Statement statement = connection.createStatement();
int id = Integer.parseInt(request.getParameter("Id"));
ResultSet columns = statement.executeQuery("Delete * FROM Member WHERE Pid ="+ id);
while (columns.next())
{
int Id = columns.getInt("Pid");
String Name = columns.getString("Name");
String CName = columns.getString("CName");
String D = columns.getString("D");
%>
<TR>
<TD><%=Id%></TD>
<TD><%=Name%></TD>
<TD><%=CName%></TD>
<TD><%=D%></TD>
<INPUT TYPE = "HIDDEN" name="Id" value=<%=id%>>
<TD><INPUT TYPE = Submit VALUE ="Select"></TD></TR>
</FORM>
<% }
columns.close(); statement.close(); connection.close();
%>

</FORM>
</TABLE>
</BODY>
</HTML>
13 years ago
JSP