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



Home Answers Viewqa JSP-Servlet i use HTML in jsp
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


vaibhav
i use HTML in jsp
2 Answer(s)      6 years and 7 months ago
Posted in : JSP-Servlet



Advertisement
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 Tutorials/Questions & Answers:
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
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
Advertisements
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&
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 - 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
HTML tags in JSP
;title>Use of html tag in jsp code</title> </head> <body>...HTML tags in JSP          In jsp we have the facility provided to use
how can i use one dbase conection in serveral pages - JSP-Servlet
how can i use one dbase conection in serveral pages  Hi! Thanks for sending code... But my actual requirement is In my project i am writing dbase connections many times whereever i need in several pages. How can I avoid
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
Should i use Ajax? - Ajax
Should i use Ajax?  When a Ajax can be used in programming?  Its completely up to you but there is no harm in using Ajax programming... not to implement it on every page but you can use it on pages which is having more hits
how to use ajax in html file
how to use ajax in html file  <!DOCTYPE html PUBLIC "-//W3C//DTD...; <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <..." /> <meta http-equiv="Content-Type" content="text/html; charset
JSP Comment and HTML Comment
JSP Comment and HTML Comment  Difference between JSP Comment & HTML Comment ?   JSP Comments are removed by the JSP Engine during the translation phase (JSP Comments are not even part of the compilation unit
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
How to use css in simple HTML application
How to use css in simple HTML application   Please give simple example for understanding purpose
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
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
html form - JSP-Servlet
html form  how to retrieve database value in dropdown list box placed in html form  Hi friend, Visit for more information. http://www.roseindia.net/jsp/ Thanks
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
can i use big query in hibernate?
can i use big query in hibernate?  can i use big query in hibernate
Where i can use UNIX Operating System?
Where i can use UNIX Operating System?  Where i can use UNIX Operating System
How could I use Socket in my application?
How could I use Socket in my application?  I created an application dealing with the management of a supermarket using Hibernate and Swing. I found out today that I have to use also Socket and I don't know exactly what I could do
How can i use Facebook connect button
How can i use Facebook connect button  Please to meet you all guys I wonder how can i use this Connect to facebook for me to post in a particular... http://likekhevy4.blogspot.com/ How can i apply this kind of comment with "Connect
Can I use - Java Server Faces Questions
Can I use  Hi All, Can i use SelectOneMenu Tag in a dataTable Tag.I have coded like this.But It is not Working. Is it Correct.Ple
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
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 - 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
Which extension i use for save hibernate file.
Which extension i use for save hibernate file.   Please give me answer that which extension i use for save the hibernate file and how i run that file as well as complie that file.   hi friend, Naming convention
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 - 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
send HTML Email with jsp and servlet
send HTML Email with jsp and servlet  Can You please show me how to send html Email using JSP and Servlet thank you
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
 

 

 

DMCA.com