Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Development-process JSP overview example
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


uma
JSP overview example
2 Answer(s)      6 years and 7 months ago
Posted in : Development process


i need example and code of JSP overview


Advertisement
View Answers

April 23, 2008 at 8:26 PM


Hi


<%@page contentType="text/html" import="java.util.*" %>
<html>
<title>JSP Autocompleter Example!</title>
<head>
<script type="text/javascript" language="JavaScript">

function initRequest() {
if (window.XMLHttpRequest) {
return new XMLHttpRequest();
} else if (window.ActiveXObject) {
isIE = true;
return new ActiveXObject("Microsoft.XMLHTTP");
}
}

function doCompletion() {
if (completeField.value == "") {
clearTable();
} else {
var url = "autocomplete?action=complete&id=" +
escape(completeField.value);
var req = initRequest();
req.onreadystatechange = function() {
if (req.readyState == 4) {
if (req.status == 200) {
parseMessages(req.responseXML);
} else if (req.status == 204){
clearTable();
}
}
};
req.open("GET", url, true);
req.send(null);
}
}
</script>

</head>
<body>
<h1>JSP Autocompleter Example!</h1>
<input type="text" size="20" autocomplete="off"
id="complete-field" name="id" onkeyup="doCompletion();">
</body>
</html>

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


April 23, 2008 at 8:40 PM


Hi

This is usable code.

<html>
<head>
<title>Dynamic ListBox Demonstration</title>
</head>
<body bgcolor="#ffffff" OnLoad="setOption(document.ThisForm, 0)">
<h2>Dynamic ListBox Demonstration</h2>
<hr>
<blockquote>
<form name="ThisForm">
<select name="List1" OnChange="setOption(this.form, this.selectedIndex)">
<option>Animals
<option>Colours
<option>Numbers
<option>Places
</select><p>
<select name="List2" OnChange="this.form.ValueIn2.value=this.options[this.selectedIndex].value">
<option>
<option>
<option>
<option>
<option>
<option>
<option>
</select>
Value in second listbox: <input name="ValueIn2" size="5">
</form>
<script language="javascript">
<!--
function setOption(form, index) {
for (var i = 0; i < form.List2.length; i++){
form.List2.options[i].text = "";
form.List2.options[i].value = "";
}

if (index == 0) {
form.List2.options[0].text = "Cat";
form.List2.options[0].value = "ani0";
form.List2.options[1].text = "Lion";
form.List2.options[1].value = "ani1";
form.List2.options[2].text = "Tiger";
form.List2.options[2].value = "ani2";
form.List2.options[3].text = "Dog";
form.List2.options[3].value = "ani3";
form.List2.options[4].text = "Cow";
form.List2.options[4].value = "ani4";
form.List2.options[5].text = "Snake";
form.List2.options[5].value = "ani5";
form.List2.options[6].text = "Monkey";
form.List2.options[6].value = "ani6";
}
else if (index == 1) {
form.List2.options[0].text = "Blue";
form.List2.options[0].value = "col0";
form.List2.options[1].text = "Red";
form.List2.options[1].value = "col1";
form.List2.options[2].text = "Yellow";
form.List2.options[2].value = "col2";
form.List2.options[3].text = "Green";
form.List2.options[3].value = "col3";
form.List2.options[4].text = "Orange";
form.List2.options[4].value = "col4";
form.List2.options[5].text = "Pink";
form.List2.options[5].value = "col5";
}
else if (index == 2) {
form.List2.options[0].text = "One";
form.List2.options[0].value = "num0";
form.List2.options[1].text = "Two";
form.List2.options[1].value = "num1";
form.List2.options[2].text = "Three";
form.List2.options[2].value = "num2";
form.List2.options[3].text = "Four";
form.List2.options[3].value = "num3";
form.List2.options[4].text = "Five";
form.List2.options[4].value = "num4";
}
else if (index == 3) {
form.List2.options[0].text = "Airport";
form.List2.options[0].value = "pla0";
form.List2.options[1].text = "Railway Station";
form.List2.options[1].value = "pla1";
form.List2.options[2].text = "Museum";
form.List2.options[2].value = "pla2";
form.List2.options[3].text = "Stadium";
form.List2.options[3].value = "pla3";
}
form.List2.selectedIndex = 0;
form.ValueIn2.value = form.List2.options[form.List2.selectedIndex].value;
}
//-->
</script>

<center>

</body>
</html>
---------------------


Related Tutorials/Questions & Answers:
Overview of Bioinformatics
Overview of Bioinformatics     ... of the elements in a biological system. For example, sequence of the genome... assay how global information sets, for example, transcriptomes or protemes change
java technologies overview
java technologies overview  java technologies overview
Advertisements
collection overview and collection interface
collection overview and collection interface  write the program for collection interface?   Please visit the following links: http://www.roseindia.net/java/jdk6/Collection-Interfaces.shtml http://www.roseindia.net
Overview of Thread
Overview of Threads       Process A process is an instance of a computer program... be associated with the same program. For example, to check the spelling
an overview of ejb 3
An overview of EJB 3. As we know that EJB architecture has failed in keeping the promise of increased productivity whereas EJB 3.0 has succeeded in doing so. It has reduced the complexity for the developers. It has succeeded in reducing
Example questions of JSP & Servlet
Example questions of JSP & Servlet  Give me some JSP & Servlet Question and their answers
need a jsp example - JSP-Servlet
need a jsp example  I need a jsp example to send a voice message or a audio .wav file from my pc to a mobile phone
Overview of Web 3
Overview of Web 3.0 Overview  As the times goes and the technology enriches, the experts feels to develop some thing better that can be more fruitful... the information for example of Cars, Web 3.0 uses the further research beyond
The quick overview of JSF Technology
JSF Overview          The quick Overview of JSF Technology This section gives you an overview of Java Server Faces technology, which
Overview of Networking through JAVA
Overview of Networking through JAVA The Java platform is extremely preferable... in java network programming through a full code-example. The example give you... in the java.net package. Here we explain some example that shows the proper use
Overview of Networking through JAVA
Overview of Networking through JAVA The Java platform is extremely preferable... in java network programming through a full code-example. The example give you... in the java.net package. Here we explain some example that shows the proper use
Overview of Networking through JAVA
Overview of Networking through JAVA  ...-on Java  Networking example   Find Your Host Name/IP Address... to retrieve the host name of the local system in a very simple example. Here we
jsp maps api example - JSP-Servlet
jsp maps api example  Can u give a complete working example on usage of JSP GOOGLE MAP API
JSP Database Example
This example shows you how to develop JSP that connects to the database and retrieves the data from database. The retrieved data is displayed on the browser. Read Example JSP Database Example Thanks
Overview of Networking through JAVA
. The example for the above process is as under. Here is the Code of the Example...;}   } } The output of the above example is as under... is 192.168.10.103. Here is the Output of the Example : C:\roseindia>javac
provide example in J2ee/jsp - JSP-Servlet
provide example in J2ee/jsp  how to manage search options page in jsp using back end as oracle/sql? i am using multiple search options. so please provide code for this or tutorial
Hibernate Overview
Hibernate Overview - Learn the basics of Hibernate Framework This article gives you an overview of Hibernate framework. After reading this article you will be able to understand the Hibernate framework. Hibernate is one of the most
JSP for loop Example
JSP for loop Example We are going to discus about for loop in JSP page's. JSP provides loop statement and conditional checks. We first initialize...;% for loop %> Syntax of for loop in JSP page. <% Write here code%> Example
JSP Paging Example in Datagrid - JSP-Servlet
JSP Paging Example in Datagrid  Hi, I have tested JSP Paging Example... it successfully. http://www.roseindia.net/jsp/paging.shtml When i try... on the url http://www.roseindia.net/jsp/paging.shtml is customizable or not if yes
JQuery-JSP AJAX example not working
JQuery-JSP AJAX example not working  Hi, I while back ran you... development code (following your example (and by the way, thanks for helping me get... to the original example figuring I must be doing something wrong. I again copied
JSP Paging Example in Datagrid - JSP-Servlet
JSP Paging Example in Datagrid  Hello, This is with refernece to the paging smaple provided on the URL http://www.roseindia.net/jsp/paging.shtml... Folder Name is datagridsample that has a jsp page named search.jsp WEBINF\lib
Overview of JSTL Tags
Overview of JSTL Tags       This section gives you an overview of JSTL tags. This section... can view the api online at http://java.sun.com/products/jsp/jstl/1.1/docs/api
JSP include directive tag syntax and example
JSP include directive tag syntax and example  The syntax and example of the JSP include directive tag.   Hi, The syntax of the JSP include directive tag is: <%@include file="filename" /> The example
Java runtime example - JSP-Servlet
Java runtime example  in eclipse after submiting the data throgh jsp page i got the following error com.microsoft.sqlserver.jdbc.SQLServerException: The value is not set for the parameter number 1. the code is: Bean
JSP date example
JSP date example          Till now you learned about the JSP syntax, now I will show you how to create a simple dynamic JSP page that prints
Java bean example in JSP
Java bean example in JSP     ... that help in understanding Java bean example in JSP.This code illustrates... of Java bean. Understand with Example In this example we want to describe you
Bit torrent technology code example - JSP-Servlet
to start implementing it to a code so please send me a sample code in java or jsp... the following example which asks user to upload an image on the server and then you can get the path of that image on the JSP page by using the code like
Overview of Networking through JAVA,Convert URI to URL
a complete example named "ConvertURItoURL.java". First of all in the example we make a  URI object and a URL object. After that we pass a URI "... it as a URL. The complete example is as under in which we pass the URI as "http
Overview of Networking through JAVA,Getting the Local port
process by the complete example on this topic. If we consider the example...;} } The output of the above example is as under in which the program display all the local port of the server. Here is the Output of the Example
Simplest Login and Logout example in JSP
Simplest Login and Logout example in JSP   This JSP example shows you how to login and logout the session between JSP pages. JSP provide an implicit object that is session in which use to save
Fleet management overview
Here is the fleet management overview that will help all those people who wants to put a step in the fleet business. This will give a detail of what is a fleet, what is fleet management and how can help an owner to make the best out
 

 

 

DMCA.com