capture

capture

How can i capture values or text selected in drop down menu or in combo box or in any input forms and print it on the same page ?? also the selected value i want to store it in data base. how can i do that??

plzzzz reply soon...!

View Answers

May 31, 2011 at 1:13 PM

1)selCombo.html:

<html>
<script>
function selValue(){
var mytext = document.form.sel.options[document.form.sel.selectedIndex].text;
document.getElementById('lab').style.visibility="visible";
document.getElementById('val').style.visibility="visible";
document.form.val.value=mytext;
}

</script>
<form name="form" method="post" action="http://localhost:8080/examples/jsp/save.jsp">
<select name="sel" id="sel" onchange="selValue();">

              <option value="<-Select->"><- Select- ></option>
              <option value="India">India</option>
              <option value="USA">USA</option>
              <option value="Srilanka">Srilanka</option>
              <option value="Japan">Japan</option>
              <option value="Australia">Australia</option>

            </select>
            <br><br>
            <label id="lab" name="lab" style="visibility:hidden;">You have selected:</label><input style="visibility:hidden;" id="val" type="text" name="val" ><br>

            <input type="submit" value="Save" >
</html>

2)save.jsp:

<%@page import="java.sql.*"%>
<%
try{
String str=request.getParameter("val");
Class.forName("com.mysql.jdbc.Driver").newInstance();  
 Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/test","root","root");  
Statement st=con.createStatement();
int i=st.executeUpdate("insert into country(countryname) values('"+str+"')");
out.println("Inserted Successfully!");
}
catch(Exception e){
    System.out.println(e);
}
%>









Related Tutorials/Questions & Answers:
capture
capture  How can i capture values or text selected in drop down menu or in combo box or in any input forms and print it on the same page ?? also the selected value i want to store it in data base. how can i do that?? plzzzz
webpage capture
webpage capture   webpage capture source code using jsps and servlets
Advertisements
Screen Capture
Screen Capture  How to capture the screen using jsps and servlets
ModuleNotFoundError: No module named 'capture'
ModuleNotFoundError: No module named 'capture'  Hi, My Python... 'capture' How to remove the ModuleNotFoundError: No module named 'capture... to install padas library. You can install capture python with following command
ModuleNotFoundError: No module named 'capture'
ModuleNotFoundError: No module named 'capture'  Hi, My Python... 'capture' How to remove the ModuleNotFoundError: No module named 'capture... to install padas library. You can install capture python with following command
Capture a image and upload to server
Capture a image and upload to server  Hai team i have trouble to capture a image and upload to server in java me........... So i want a code immediately,.......To capture a image and upload to server in j2me...... If you give
How to capture screenshot in url?
How to capture screenshot in url?  Hi, How to capture screenshot and it will store the capture image in url like this http://localhost/xxx/yyy/ it wil not sore C:\ or D:\ it should store like this http://localhost/xxx/yyy
php web page capture
php web page capture  How to capture the history of a web page using PHP
ModuleNotFoundError: No module named 'link_capture'
ModuleNotFoundError: No module named 'link_capture'  Hi, My Python... 'link_capture' How to remove the ModuleNotFoundError: No module named 'link_capture' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'quartet_capture'
ModuleNotFoundError: No module named 'quartet_capture'  Hi, My... named 'quartet_capture' How to remove the ModuleNotFoundError: No module named 'quartet_capture' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'todoist-capture'
ModuleNotFoundError: No module named 'todoist-capture'  Hi, My... named 'todoist-capture' How to remove the ModuleNotFoundError: No module named 'todoist-capture' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'trello-capture'
ModuleNotFoundError: No module named 'trello-capture'  Hi, My... named 'trello-capture' How to remove the ModuleNotFoundError: No module named 'trello-capture' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'capture-assembler'
ModuleNotFoundError: No module named 'capture-assembler'  Hi, My... named 'capture-assembler' How to remove the ModuleNotFoundError: No module named 'capture-assembler' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'capture-me'
ModuleNotFoundError: No module named 'capture-me'  Hi, My Python... 'capture-me' How to remove the ModuleNotFoundError: No module named 'capture-me' error? Thanks   Hi, In your python environment you
ModuleNotFoundError: No module named 'fer-capture'
ModuleNotFoundError: No module named 'fer-capture'  Hi, My Python... 'fer-capture' How to remove the ModuleNotFoundError: No module named 'fer-capture' error? Thanks   Hi, In your python environment
ModuleNotFoundError: No module named 'gripit-capture'
ModuleNotFoundError: No module named 'gripit-capture'  Hi, My... named 'gripit-capture' How to remove the ModuleNotFoundError: No module named 'gripit-capture' error? Thanks   Hi, In your python
url capture in javaScript
url capture in javaScript  Hi All, I m creating a bookmark to capture the url of the site and the user's input in the bookmark,in javaScript.this url and user input is to be saved into DB. Following is my code.Result
ModuleNotFoundError: No module named 'django-capture-tag'
ModuleNotFoundError: No module named 'django-capture-tag'  Hi, My... named 'django-capture-tag' How to remove the ModuleNotFoundError: No module named 'django-capture-tag' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'docker-network-capture'
ModuleNotFoundError: No module named 'docker-network-capture'  Hi...: No module named 'docker-network-capture' How to remove the ModuleNotFoundError: No module named 'docker-network-capture' error? Thanks   Hi
ModuleNotFoundError: No module named 'nionswift-video-capture'
ModuleNotFoundError: No module named 'nionswift-video-capture'  Hi...: No module named 'nionswift-video-capture' How to remove the ModuleNotFoundError: No module named 'nionswift-video-capture' error? Thanks   
ModuleNotFoundError: No module named 'pi-camera-capture'
ModuleNotFoundError: No module named 'pi-camera-capture'  Hi, My... named 'pi-camera-capture' How to remove the ModuleNotFoundError: No module named 'pi-camera-capture' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'pytest-capture-deprecatedwarnings'
ModuleNotFoundError: No module named 'pytest-capture-deprecatedwarnings' ...: ModuleNotFoundError: No module named 'pytest-capture-deprecatedwarnings' How to remove the ModuleNotFoundError: No module named 'pytest-capture-deprecatedwarnings'
ModuleNotFoundError: No module named 'scapy-nflog-capture'
ModuleNotFoundError: No module named 'scapy-nflog-capture'  Hi, My... named 'scapy-nflog-capture' How to remove the ModuleNotFoundError: No module named 'scapy-nflog-capture' error? Thanks   Hi
ModuleNotFoundError: No module named 'scapy-nflog-capture'
ModuleNotFoundError: No module named 'scapy-nflog-capture'  Hi, My... named 'scapy-nflog-capture' How to remove the ModuleNotFoundError: No module named 'scapy-nflog-capture' error? Thanks   Hi
ModuleNotFoundError: No module named 'docker-netowrk-capture'
ModuleNotFoundError: No module named 'docker-netowrk-capture'  Hi...: No module named 'docker-netowrk-capture' How to remove the ModuleNotFoundError: No module named 'docker-netowrk-capture' error? Thanks   Hi
ModuleNotFoundError: No module named 'docker-network-capture'
ModuleNotFoundError: No module named 'docker-network-capture'  Hi...: No module named 'docker-network-capture' How to remove the ModuleNotFoundError: No module named 'docker-network-capture' error? Thanks   Hi
ModuleNotFoundError: No module named 'jupyterlab-media-capture'
ModuleNotFoundError: No module named 'jupyterlab-media-capture'  Hi...: No module named 'jupyterlab-media-capture' How to remove the ModuleNotFoundError: No module named 'jupyterlab-media-capture' error? Thanks  
ModuleNotFoundError: No module named 'docker-netowrk-capture'
ModuleNotFoundError: No module named 'docker-netowrk-capture'  Hi...: No module named 'docker-netowrk-capture' How to remove the ModuleNotFoundError: No module named 'docker-netowrk-capture' error? Thanks   Hi
ModuleNotFoundError: No module named 'mac-copy-capture'
ModuleNotFoundError: No module named 'mac-copy-capture'  Hi, My... named 'mac-copy-capture' How to remove the ModuleNotFoundError: No module named 'mac-copy-capture' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'pi-camera-capture'
ModuleNotFoundError: No module named 'pi-camera-capture'  Hi, My... named 'pi-camera-capture' How to remove the ModuleNotFoundError: No module named 'pi-camera-capture' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'rpi-mail-cam-capture'
ModuleNotFoundError: No module named 'rpi-mail-cam-capture'  Hi...: No module named 'rpi-mail-cam-capture' How to remove the ModuleNotFoundError: No module named 'rpi-mail-cam-capture' error? Thanks   Hi
ModuleNotFoundError: No module named 'django-capture-tag'
ModuleNotFoundError: No module named 'django-capture-tag'  Hi, My... named 'django-capture-tag' How to remove the ModuleNotFoundError: No module named 'django-capture-tag' error? Thanks   Hi, In your
can I capture wifi trafic in windows?
can I capture wifi trafic in windows?  Hi, can I analyse wifi trafic in windows and not in linux ? thank you
How to capture picture from webcam using java
How to capture picture from webcam using java  i want catch the image from web-cam using jsp, If anyone knows please answer me
How to capture output from console into textarea in java?
How to capture output from console into textarea in java?  Hi, I would like to know how can we display the result of a program in java into a textarea instead of displaying it on console. Thanks
How to capture video and then how to store it in mobile memory
How to capture video and then how to store it in mobile memory  Hello there, I'm developing a mobile application where i'm capturing video from... but they are not working properly some of them capture video but doesn't allow me
Data Capture from resume - JSP-Servlet
Data Capture from resume  Hi Sir, In My Application, when i Upload a resume the relevant columns like name,phone,email,skills etc need to be captured automatically and must be stored into the database. Please solve
Capture browser file download event - JSP-Servlet
Capture browser file download event  Hi, I appreciate your help and thaanks for that.But my question was when filedownload dialog box comes in browser,how we can come to know that user has clicked on Open,save or cancel button
Screen Capture
ModuleNotFoundError: No module named 'cgquery_xml_to_bamlibrary_capture_json'
ModuleNotFoundError: No module named 'cgquery_xml_to_bamlibrary_capture_json...: ModuleNotFoundError: No module named 'cgquery_xml_to_bamlibrary_capture_json' How..._capture_json' error? Thanks   Hi, In your python environment
com.onfido.sdk.capture - onfido-capture-sdk version 16.2.0 Maven dependency. How to use onfido-capture-sdk version 16.2.0 in pom.xml?
com.onfido.sdk.capture  - Version 16.2.0 of onfido-capture-sdk Maven... of onfido-capture-sdk in pom.xml? How to use onfido-capture-sdk version 16.2.0... com.onfido.sdk.capture  - Version 16.2.0 of onfido-capture-sdk in project
com.onfido.sdk.capture - onfido-capture-sdk version 14.1.2 Maven dependency. How to use onfido-capture-sdk version 14.1.2 in pom.xml?
com.onfido.sdk.capture  - Version 14.1.2 of onfido-capture-sdk Maven... of onfido-capture-sdk in pom.xml? How to use onfido-capture-sdk version 14.1.2... com.onfido.sdk.capture  - Version 14.1.2 of onfido-capture-sdk in project
com.onfido.sdk.capture - onfido-capture-sdk version 5.3.3 Maven dependency. How to use onfido-capture-sdk version 5.3.3 in pom.xml?
com.onfido.sdk.capture  - Version 5.3.3 of onfido-capture-sdk Maven...-capture-sdk in pom.xml? How to use onfido-capture-sdk version 5.3.3 in pom.xml... com.onfido.sdk.capture  - Version 5.3.3 of onfido-capture-sdk in project
Maven Repository/Dependency: com.onfido.sdk.capture | onfido-capture-sdk
Maven Repository/Dependency of Group ID com.onfido.sdk.capture and Artifact ID onfido-capture-sdk. Latest version of com.onfido.sdk.capture:onfido-capture-sdk dependencies. # Version Release Date
com.onfido.sdk.capture - onfido-capture-sdk-core version 15.4.3 Maven dependency. How to use onfido-capture-sdk-core version 15.4.3 in pom.xml?
com.onfido.sdk.capture  - Version 15.4.3 of onfido-capture-sdk-core Maven... of onfido-capture-sdk-core in pom.xml? How to use onfido-capture-sdk-core version... it easy to use com.onfido.sdk.capture  - Version 15.4.3 of onfido-capture-sdk
com.onfido.sdk.capture - onfido-capture-sdk-core version 4.5.1 Maven dependency. How to use onfido-capture-sdk-core version 4.5.1 in pom.xml?
com.onfido.sdk.capture  - Version 4.5.1 of onfido-capture-sdk-core Maven... of onfido-capture-sdk-core in pom.xml? How to use onfido-capture-sdk-core version... it easy to use com.onfido.sdk.capture  - Version 4.5.1 of onfido-capture-sdk
com.onfido.sdk.capture - onfido-capture-sdk-core version 19.3.1 Maven dependency. How to use onfido-capture-sdk-core version 19.3.1 in pom.xml?
com.onfido.sdk.capture  - Version 19.3.1 of onfido-capture-sdk-core Maven... of onfido-capture-sdk-core in pom.xml? How to use onfido-capture-sdk-core version... it easy to use com.onfido.sdk.capture  - Version 19.3.1 of onfido-capture-sdk
Maven Repository/Dependency: com.onfido.sdk.capture | onfido-capture-sdk-core
Maven Repository/Dependency of Group ID com.onfido.sdk.capture and Artifact ID onfido-capture-sdk-core. Latest version of com.onfido.sdk.capture:onfido-capture-sdk-core dependencies. # Version Release Date
how to capture jsf form data - Java Server Faces Questions
how to capture jsf form data  hi , i have a jsf page with username ,password and submitt button,if i submitt the data then it has to store in the database this is the task i have to do plese tell me the procedure how to do
Maven dependency for com.onfido.sdk.capture - onfido-capture-sdk version 11.1.1 is released. Learn to use onfido-capture-sdk version 11.1.1 in Maven based Java projects
of onfido-capture-sdk released The developers of   com.onfido.sdk.capture - onfido-capture-sdk project have released the latest version... - onfido-capture-sdk library is 11.1.1. Developer can use this version

Ads