Home Answers Viewqa JSP-Servlet i use HTML in jsp

 
 


vaibhav
i use HTML in jsp
2 Answer(s)      5 years and a month ago
Posted in : JSP-Servlet

View Answers

May 3, 2008 at 7:16 PM


Hi

<html>
<head>
<title>display list</title>
<script language="javascript" src="list.js">

</script>
</head>
<body bgcolor="#CCFFFF" onload="fillCategory();">
<table border="1" width="50%" cellspacing="0" cellpadding="0">
<FORM name="drop_list" >
<table border="1" width="50%" cellspacing="0" cellpadding="0">
<SELECT NAME="Selects" onChange="SelectSubCat();" >
<Option value="">Selects</option>
</SELECT>
<br/>
<br>
<SELECT id="SubCat" NAME="SubCat">
<Option value="">SubCat</option>
</SELECT>
</table>
</form>
</td>
</tr>
</table>

</body>

</html>

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

function fillCategory(){
addOption(document.drop_list.Selects, "India", "India", "");
addOption(document.drop_list.Selects, "USA", "USA", "");
addOption(document.drop_list.Selects, "Scripts", "Scripts", "");
}
function SelectSubCat(){
removeAllOptions(document.drop_list.SubCat);
addOption(document.drop_list.SubCat, "", "SubCat", "");
if(document.drop_list.Selects.value == 'India'){
addOption(document.drop_list.SubCat,"Agra", "Agra");
addOption(document.drop_list.SubCat,"Delhi", "Delhi");
addOption(document.drop_list.SubCat,"Kolkata", "Kolkata");
addOption(document.drop_list.SubCat,"Puri", "Puri");
addOption(document.drop_list.SubCat,"Ahmedabad", "Ahmedabad");
addOption(document.drop_list.SubCat,"Faridabad", "Faridabad");
addOption(document.drop_list.SubCat,"Lucknow", "Lucknow");
addOption(document.drop_list.SubCat,"Ghaziabad", "Ghaziabad");
addOption(document.drop_list.SubCat,"Ludhiana", "Ludhiana");
addOption(document.drop_list.SubCat,"Rajkot", "Rajkot");
addOption(document.drop_list.SubCat,"Allahabad", "Allahabad");
addOption(document.drop_list.SubCat,"Goa", "Goa");

}if(document.drop_list.Selects.value == 'USA'){
addOption(document.drop_list.SubCat,"Alabama", "Alabama");
addOption(document.drop_list.SubCat,"Alaska", "Alaska");
addOption(document.drop_list.SubCat,"Arizona", "Arizona");
addOption(document.drop_list.SubCat,"California", "California");
addOption(document.drop_list.SubCat,"Colorado", "Colorado");
addOption(document.drop_list.SubCat,"Connecticut", "Connecticut");
}
}
function removeAllOptions(selectbox){
var i;
for(i=selectbox.options.length-1;i>=0;i--){
//selectbox.options.remove(i);
selectbox.remove(i);
}
}


function addOption(selectbox, value, text ){
var optn = document.createElement("OPTION");
optn.text = text;
optn.value = value;
selectbox.options.add(optn);
}


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


May 3, 2008 at 7:17 PM


read for more information,

http://www.roseinda.net/jsp/









Related Pages:
i use HTML in jsp - JSP-Servlet
i use HTML in jsp  i want to make a list box of select state...){ var i; for(i=selectbox.options.length-1;i>=0;i--){ //selectbox.options.remove(i); selectbox.remove(i); } } function addOption(selectbox
Html Template - JSP-Servlet
Html Template   I use a template to design my website,but some... on to the servlet,the response of the servlet is a jsp page.on this page template is not applied.. what can i do
Html
:48:44 PM Author : SAMSUNG --%> <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01...; <head> <meta http-equiv="Content-Type" content="text/html
Html
:48:44 PM Author : SAMSUNG --%> <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01...; <head> <meta http-equiv="Content-Type" content="text/html
html-jsp
html-jsp  If i want to get dynamic value in html textbox or in jsp,then how can I get the value,how the value will be transfered from servlet page to the html textbox.Thanx in advance.....Kindly help me
HTML
2008.i am giving the datatype as date. and also i am try put the datatype as datetime,datetimeoffset but its not working. when i am select the dateofbirth it shows as null. here is the html code for date of birth: <tr> <
javascript-html - JSP-Servlet
javascript-html  i want to dynamically create textfield with option button as another/remove when user presses in jsp page which will be in table.for... remove is pressed,corresponding row to be deleted.   Hi Friend, Use
HTML
HTML  Following is the my coding.but when i click on submit it can not take the form action **Here is my code** <html> <head> <.../ This notice must stay intact for use */ </script> <script language
HTML
HTML  Following is the my coding.but when i click on submit it can not take the form action **Here is my code** <html> <head> <.../ This notice must stay intact for use */ </script> <script language
JSP:HTML Form in-place Editing - JSP-Servlet
JSP:HTML Form in-place Editing  Hi, I want to thank the people.... Also, when I use it for a character column, if the backend table column has... for single word highlighting). Can you tell me if I can use the character columns
JSP:HTML Form in-place Editing - JSP-Servlet
JSP:HTML Form in-place Editing  I have an HTML form (form #1) which... its not working. I don't know if this is the best method, I don't want to use... page i also have a search facility that will search and show the results
Link from html to jsp - Development process
Link from html to jsp   Hi, Can u send me code. when i click html link button , control should go to jsp page wat i mentioned in view... that specify the full path of jsp in html page with href tag. Use
How to use for loop in jsp
the use of 'for' in JSP. use_for_loop.jsp <!DOCTYPE HTML PUBLIC "...How to use 'for' loop in jsp page ? This is detailed java code that shows how to use 'for' loop in jsp page. 'if' statement is used to test conditions while
how to use sendRedirect in doGet method in jsp?
how to use sendRedirect in doGet method in jsp?  i am getting problem in jsp that when we are directly writing address to a jsp page in addressbar the jsp page should redirect it to the html page.   can any one tell me
How to use 'for' loop in jsp page?
How to use 'for' loop in jsp page?   ... of 'for' in JSP.           use_for_loop.jsp...;) { // use for loop for (int i = 0; i <
how do i use sql like query in my jsp page
how do i use sql like query in my jsp page  how do i use sql like query in my jsp page   Hi Friend, Try the following code: <%@ page import="java.sql.*"%> <% Class.forName("sun.jdbc.odbc.JdbcOdbcDriver
JSP to add details to a database from a HTML form.
JSP to add details to a database from a HTML form.  Hi I'm a second year CS student who has to use JSP to validate a HTML form and add the details entered into a database. The files are all in one folder for use in tomcat
How I get a variable from java script to use it in the scriptlet of jsp.
How I get a variable from java script to use it in the scriptlet of jsp.  Hi i want to get the tinyUrl value in the scriptlet of jsp. // Bit.ly API var url="http://cplive.com/dealDetail.do?method=displayDealDetail&
I want this jsp answers
I want this jsp answers    How can we declare third party classes and interfaces inside our jsp page? How can we declare and definr global variables...(Y/N)? Is it Possible to include html pages to jsp pages(Y/N
I want this jsp answers
I want this jsp answers    How can we declare third party classes and interfaces inside our jsp page? How can we declare and definr global variables...(Y/N)? Is it Possible to include html pages to jsp pages(Y/N
Use Break Statement in jsp code
Use Break Statement in jsp code   ...;H1>use break statement in jsp code</H1> <% double array... = 0; i < array.length; i++) { sum += array[i]; // use
html-jsp - getparameter() - JSP-Servlet
html-jsp - getparameter()  Hi! friedns, This is my front end and I want to retrieve username and password in two different jsp pages. I used getParameter() with two form action as shown below. But I am not getting
Drop-down text selection in jsp/html
Drop-down text selection in jsp/html  Hi, I am trying to create JSP page where I have two drop-downs. There are two-sets of data - First set... category or genre. I do not wish to use String manipulation since the data
Use Of Id attribute in Html - Development process
Use Of Id attribute in Html    Hi, I am new to web page development.Could u plz explain what is use of id attribute in html. For example..., The id attribute specifies a unique id for an HTML element that assigns
HTML in the box
HTML in the box  Can I use any HTML in the box
i can not connect to database in servlet - JSP-Servlet
i can not connect to database in servlet  Hi I am following the tutorial in this site on servlet and JDBC. I did all the proccedure for connecting...:8080/DataInsertion/DataInsertion) in the browser, i got no response and the page stayed blank
i can not connect to database in servlet - JSP-Servlet
i can not connect to database in servlet  Hi I am following the tutorial in this site on servlet and JDBC. I did all the proccedure for connecting...:8080/DataInsertion/DataInsertion) in the browser, i got no response and the page stayed blank
HTML - JSP-Servlet
HTML   To process a value in jsp project I have to set the text box as non editable. what is the attribute and value to be submitted... code. Visit for more information. http://www.roseindia.net/jsp
Use Ordered List In JSP
Use Ordered List In JSP   I created a Sting that contains ... . This string is generated dynamically from the db. When I place the string in the jsp, it does not create the ordered list. I can paste that string in the jsp
html - JSP-Servlet
html  actually i m creating one site in which i want to insert login function like we see in this site in the same manner i want to create a login function according to which user r able to see their things for that i need code i
javascript-html - JSP-Servlet
javascript-html  i want to dynamically create textfield with option button as another/remove when user presses in jsp page which will be in table.for example table contains one row with 2 columns,one textfield,second dropdown
struts <html:select> - Struts
) org.apache.jsp.jsp.editDealerNo_jsp._jspx_meth_html_options_0(editDealerNo_jsp.java:442) org.apache.jsp.jsp.editDealerNo_jsp._jspx_meth_html_select_0(editDealerNo_jsp.java:396) org.apache.jsp.jsp.editDealerNo_jsp._jspx_meth_html_form_0
html
html  how to convert html page into jsp page
How to retrieve array values from html form to jsp?
How to retrieve array values from html form to jsp?  Hi! I am developing an dynamic user interface. I hv developed html forms and i wat to convert it into jsp. Means i just want to retrieve values from html form containing array
HTML tags in JSP
HTML tags in JSP          In jsp we have the facility provided to use the html...="5" COLOR="#660033">Use of html tag in jsp code<
html - JSP-Servlet
html  Hi, I need help with a code to make the "browse" button open in a specific folder, like My Documents/My Images. I've looked everywhere and I can't seem to find
HTML
HTML  What is a tag? How can we use MARQUEE in HTML
html
html  i want a registration page in html with good background
HTML entityname
HTML entityname   Which should I use, & entityname or &#number
html
html  sir i am new to eclipse and i am created a html program and also tomcat is running successfully in side the eclipse.but now how i deploy that html program in the eclipse
convert html to excel using jsp
convert html to excel using jsp   i want to convert a html page into mcrosoft excel page using jsp.how i do
Data fetching from JSP or HTML - JSP-Servlet
Data fetching from JSP or HTML  Hi Deepak, Can u pls help me as i have a problem with jsp/html frameset. my question is how can i fetch the data from frameset which is in html format.pls help me. Thanks
Html code for search - Development process
if you want to use HTML code with JSP and Servlet to search from database...Html code for search   Hi, when i click search button .It has to display table with data. I have completed design only. Plz give code
html - JDBC
html  How to insert a new column into HTML (or jsp) table dynamically? i have to print a table of html depending on number of subjects (where... jsp but i am not able to print them on the table because table columns
HTML - I tag example.
HTML - I tag example. Description : It is a text formatting tag. It display...>HTML -- I tag Example. </h1> <p> Roseindia Technology Pvt...;head> <base href="http://roseindia.net"> <title>HTML
How to use 'for' loop in jsp page?
How to use 'for' loop in jsp page?   ... of 'for' in JSP.           use_for_loop.jsp...;) { // use for loop for (int i = 0; i <
HTML in Flex
HTML in Flex  Hi..... just tell me How can I embed HTML in my Flex application? Please give an example so i can implement it in my apps Thanks  Ans: Yes, you can embed HTML in flex application. You will use
Html
Html  i am select the dateofbirth through the html browser.but it can not save into the sql server 2008 database.any special code required to store the date in database by using java servlets
HTML
HTML  I have created an info.html file for the applet.The class file is located in a directory different from the HTML file.The info.html file I have... = WelcomePage.class width=300 height=300> I want to know if the code
HTML
HTML  in html how can we can upload the file <tr> <...; </td> </tr> after this i want the upload button with form action when i click the upload button it wil goto some where to upload

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.