JSP Servlet Search and Edit 2 Answer(s) 3 years ago
Posted in : JSP-Servlet
Hi,
I want to thank the people who took the time and made the effort to respond to my 2 questions posted, truly ROSEINDIA and its employees are very helpful and responsive and understand developer's needs.
This is a follow up to the HTML Form in-place editing(Previous Post). The code works fine when I've incorporated it in my web application, its really an excellent way of editing a form. I just have a few adjustments if any of you could help me, I'd really appreciate it.
1. The window.open(http:///...) I want to be able to open a page instead of a window for the editing which opens in the same location. Can you please show me how that can be achieved?
2. Also, your example suggests a customer id as the basis of editing. I have tired it for other String(char) columns as well and date columns, it works to some extent but not completely. It will highlight the rows but the editing page comes out empty for some reason its not excepting date/char columns to be passed to the following jsp. Also, when I use it for a character column, if the backend table column has more than one word in the table for example the mouse over and click will not distinguish when there are 2 words with a space in the middle(meaning it works for single word highlighting). Can you tell me if I can use the character columns or date columns as the basis of editing instead of the customer id? because there is such a need in my application
3. Last thing I wanted to know if you have an example, where you can do the similar thing with javascript, what I want to achieve is
- user fills out a form on one page. On the SAME page there is a search which populates the search result table, On single click or double click of the row selection, it populates the SAME form for editing. I've seen it in a VB application, I was wondering if this can be achieved with javascript?
Thank you so much in advance.
Regards,
freind
View Answers
May 11, 2010 at 12:45 PM
Hi Friend,
You can search on the basis of any field but it should be in the form of string.
<%@page import="java.sql.*"%> <% String id=request.getParameter("id"); Class.forName("com.mysql.jdbc.Driver").newInstance(); Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/register","root","root"); String query = "select * from client where id='"+id+"'"; Statement st = con.createStatement(); String name=request.getParameter("name"); String address=request.getParameter("address"); String contactNo=request.getParameter("contactNo"); int i=st.executeUpdate("insert into client(name,address,contactNo) values('"+name+"','"+address+"','"+contactNo+"')"); out.println("Data is inserted successfully"); %>
4)edits.jsp:
<%@page import="java.sql.*"%> <% String id=request.getParameter("id"); Class.forName("com.mysql.jdbc.Driver").newInstance(); Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/register","root","root"); String query = "select * from client where id='"+id+"'"; Statement st = con.createStatement(); String name=request.getParameter("name"); String address=request.getParameter("address"); String contactNo=request.getParameter("contactNo"); int i=st.executeUpdate("update client set name='"+name+"',address='"+address+"',contactNo='"+contactNo+"' where id='"+id+"'"); out.println("Data is updated successfully"); %>
Thanks
Related Pages:
JSP Servlet Search and Edit - JSP-Servlet JSPServletSearch and Edit Hi,
I want to thank the people who... to the following jsp. Also, when I use it for a character column, if the backend table... there is a search which populates the search result table, On single click
search feature - JSP-Servlet search feature i need help to do a search feature servlet to search for employees from the database.
the search will be done by search by employee name, department and email Hi friend,
As per your problem
Block edit menu option - JSP-Servlet
Block edit menu option I am doing a jsp project. I have to control number of characters in a text area upto a limit. How can i block pasting through edit menu and pasting through short cut key [ctrl+v
Lucene Search in JSP - JSP-Servlet
Lucene Search in JSP Hello Sir,
I want to Develop lucene - Search engine in Jsp page which can Search full text from XML file..through XML parser..
Example:
in Search interface there are one textbox after putting some value
JSP search engine - JSP-Servlet JSPsearch engine Hi!
In my project i have a concept of search engine which has to search in google and display the results in my page. My PM told me use GOOGLE API for search engine. I am developing applicatin in JSP. Can
Advance Search in Servlet
this problem. Please provide me with the necessary coding. I'm using servlet and JSP...Advance Search in Servlet Sir,
I have built an application where.... the string typed in is "With regards to the correction in pay" later on in the search
Advance Search in Servlet
this problem. Please provide me with the necessary coding. I'm using servlet and JSP...Advance Search in Servlet Sir,
I have built an application where.... the string typed in is "With regards to the correction in pay" later on in the search
Advance Search in Servlet
this problem. Please provide me with the necessary coding. I'm using servlet and JSP...Advance Search in Servlet Sir,
I have built an application where.... the string typed in is "With regards to the correction in pay" later on in the search
Advance Search in Servlet
this problem. Please provide me with the necessary coding. I'm using servlet and JSP...Advance Search in Servlet Sir,
I have built an application where.... the string typed in is "With regards to the correction in pay" later on in the search
Google Search
Google Search I have a textbox and submit button in my JSP page. On giving word in the textbox and click submit it should redirct to google search page and fetch all the results based on my input word automatically. JSP/Servlet
SEARCH
SEARCH how can we do search in jsp...?
option for search criteria like name and DOB...
Please visit the following links:
http://www.roseindia.net/jsp/user-search.shtml
http://www.roseindia.net/servlets/search.shtml
radio button value on edit action
radio button value on edit action This is my edit.jsp code...In my project 'm having search module where i have to search customer by name...I have provided show edit add and delete link for each customer that is searched
Edit the record.
are sending you a jspedit application. It will be helpful for you.
1...Edit the record. sir, I have a table consist of huge data.I have displayed that data.side of them there is an edit button which will edit
edit values of database using jsp edit values of database using jsp hi i want a code to edit the row from tye database and display in a page which containd radio buttons and drop down boxes using jsp code
edit values of database using jsp edit values of database using jsp hi i want a code to edit the row from tye database and display in a page which containd radio buttons and drop down boxes using jsp code
JSP Servlet update patient data - JSP-Servlet JSPServlet update patient data Hi Friend,
I'm attaching my inserting patient data servlet as requested. I tried your posted code, its... it is clearer.
1. I am doing a search on a patient visit table which has a FK
jsp and servlet
submit button,edit button and delete button,through which we can acces the data edit the data and delete the data,using jsp and servlet...jsp and servlet I want to create a login form,which have many fields
jsp/servlet - JSP-Servlet jsp/servlet Hello !
How can we call a servlet on a link on html page like
a href="servletname"> Call Servlet
Is it possible?
Hi friend,
I am sending simple application using servlet.
This is form
Servlet - JSP - JSP-Servlet Servlet - JSP Here is my complete code. all my code is running with out any error. the for loop in servlet is running as many times as my checkboxes...
Servlet Code:
----------------------
package com.servlet;
import
JSP Search Example code JSPSearch - Search Book Example
 ... are going to develop a small sample JSPsearch
application that searches....
We are using MySQL database and JSP & Servlet to create the
application
JSP:HTML Form in-place Editing - JSP-Servlet
of a customer search in a small table on the same page using another servlet(also working... of the rows of the search result table to select it and to edit that particular...JSP:HTML Form in-place Editing I have an HTML form (form #1) which
jsp query - JSP-Servlet jsp query in first division there is one table which contains data with edit button... when i will click on edit button that division will become hidden and new division come with all related data
Html code for search - Development process
if you want to use HTML code with JSP and Servlet to search from database:
http://www.roseindia.net/jsp/user-search.shtml
http://www.roseindia.net...Html code for search
Hi,
when i click search button .It has
Auto Search box using ajax
Auto Search box using ajax Hi , i want to implement auto search box functionality like google and linkedin using ajax,jsp,servlet, javascript etc.when the value appears on the textbox then we should also be able to select
Servlet-JSP population - JSP-Servlet Servlet-JSP population Hi,
this is regarding my previous question... let me know how to edit my code.
Servlet
------------
package com.servlet... and display in the next page.
I changed my servlet code something like this but i
Update / Edit data
Update / Edit data Hello, i want to create a page to edit or update... field that i have prepared under the submit button.
btw, im using jsp. thank you... consists of that particular id. When the user clicks the particular edit button
insert , edit , and delete button in one jsp page
insert , edit , and delete button in one jsp page hello
I want to ask about the way of creating a jsp page contains insert , edit , and delete buttons and manipulate data in database directly.
any help please or hints
Searching for Code - JSP-Servlet JSP, Servlet Searching for Code Hi, i am looking for a jspservlet code examples for the search function in my application.Thanks
delete and edit options in struts
delete and edit options in struts Hi, I am doing an web application using struts, jsp, tomcat server, oracle as a database in netbeans IDE 7.1.2, I... errors but the edit and delete operations were not working, so please modify my
delete and edit options in struts
delete and edit options in struts Hi, I am doing an web application using struts, jsp, tomcat server, oracle as a database in netbeans IDE 7.1.2, I... errors but the edit and delete operations were not working, so please modify my
delete and edit options in struts
delete and edit options in struts Hi, I am doing an web application using struts, jsp, tomcat server, oracle as a database in netbeans IDE 7.1.2, I... errors but the edit and delete operations were not working, so please modify my
delete and edit options in struts
delete and edit options in struts Hi, I am doing an web application using struts, jsp, tomcat server, oracle as a database in netbeans IDE 7.1.2, I... errors but the edit and delete operations were not working, so please modify my
delete and edit options in struts
delete and edit options in struts Hi, I am doing an web application using struts, jsp, tomcat server, oracle as a database in netbeans IDE 7.1.2, I... errors but the edit and delete operations were not working, so please modify my
delete and edit options in struts
delete and edit options in struts Hi, I am doing an web application using struts, jsp, tomcat server, oracle as a database in netbeans IDE 7.1.2, I... errors but the edit and delete operations were not working, so please modify my
delete and edit options in struts
delete and edit options in struts Hi, I am doing an web application using struts, jsp, tomcat server, oracle as a database in netbeans IDE 7.1.2, I... errors but the edit and delete operations were not working, so please modify my
delete and edit options in struts
delete and edit options in struts Hi, I am doing an web application using struts, jsp, tomcat server, oracle as a database in netbeans IDE 7.1.2, I... errors but the edit and delete operations were not working, so please modify my
delete and edit options in struts
delete and edit options in struts Hi, I am doing an web application using struts, jsp, tomcat server, oracle as a database in netbeans IDE 7.1.2, I... errors but the edit and delete operations were not working, so please modify my
delete and edit options in struts
delete and edit options in struts Hi, I am doing an web application using struts, jsp, tomcat server, oracle as a database in netbeans IDE 7.1.2, I... errors but the edit and delete operations were not working, so please modify my
delete and edit options in struts
delete and edit options in struts Hi, I am doing an web application using struts, jsp, tomcat server, oracle as a database in netbeans IDE 7.1.2, I... errors but the edit and delete operations were not working, so please modify my
Servlet-JSP population - JSP-Servlet Servlet-JSP population In refernce to this Question
http://www.roseindia.net/answers/viewanswers/9843.html
I reduced my servlet code and JSP... in my jsp page my code is working fine. If I dont check any of the item in my
search form in jsp search form in jsp search page in jsp
Please go through the following links:
http://www.roseindia.net/jsp/user-search.shtml
http://www.roseindia.net/servlets/search.shtml
Search Page in jsp Search Page in jsp search page in jsp
Please go through the following links:
http://www.roseindia.net/jsp/user-search.shtml
http://www.roseindia.net/servlets/search.shtml
Search page form in jsp Search page form in jsp search form in jsp
Please go through the following links:
http://www.roseindia.net/jsp/user-search.shtml
http://www.roseindia.net/servlets/search.shtml
how to write a program to search a record using mvc2
how to write a program to search a record using mvc2 how can we write a code to search a record in table by using java bean as model, servlet as contoller and jsp as view
SERVLET
will be done by using jsp and servlet... Plz help me,im really tensed...........
 ...SERVLET I want to create a login form with one text box submit edit... to the servlet and if the user id is correct then a new page will be displayed with his