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



Home Answers Viewqa JSP-Servlet i use HTML in jsp

Have Programming Question? Ask it here!
 
 
 


vaibhav
i use HTML in jsp
2 Answer(s)      6 years and 3 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
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
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 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
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
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
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
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
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
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
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
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
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
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
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
convert this html form to jsp
convert this html form to jsp  <html> <head> <script... Village Registration --> </body></html>   JSP page includes html tags so you may change an extension. Please visit the following links
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
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
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
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
I want solution for this jsp program..
I want solution for this jsp program..   <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@ page import="java.sql.*" %> JSP Page <%! String
how to use iframe in jsp - JSP-Servlet
how to use iframe in jsp  Hi, i am using a jsp page in whic records... links which point to error. jsp an another jsp when i click the link a new page is opened.however i require to open it in the parent jsp help me please
is it possible to use jsp in java script
is it possible to use jsp in java script  is it possible to use jsp inside the javascript while using java script in body tag on that time i am calculate number of records in mysql, so that i am using jsp.if count value
is it possible to use jsp in java script
is it possible to use jsp in java script  is it possible to use jsp inside the javascript while using java script in body tag on that time i am calculate number of records in mysql, so that i am using jsp.if count value
create html of word ,excel,ppt - JSP-Servlet
create html of word ,excel,ppt  Plzz tell me how to create html page of word , excel ,ppt document dynamically using jsp because in my project I have to store uploaded files as html page
How to use Jquery in jsp page
How to use Jquery in jsp page  Hello Sir, I am developing a web application in which i have to show database table values into Gridview in my jsp page. I have heard that jquery will be usefull for this work
I have doubt in jsp file.
I have doubt in jsp file.  I have doubt in jsp file. In a jsp file, there should be two buttons. One is start and other is stop. When we click on start then only stop should be enabled. Other wise it should be disabled. When
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 do i allow users to download a xls file in html?
how do i allow users to download a xls file in html?  can anyone help me to allow users to download a xls file in html? i tried with href="path...;i tried with href="path/filename.xls click here but it works only in chrome
html dropdownlist code - JSP-Servlet
html dropdownlist code  hi how to get textfield in html when i select the option others in the dropdown list, pls provide the code?   Hi Friend, Try the following code: function show(){ var op
html input passing to jsp method
html input passing to jsp method  i want code in which jsp method takes html input value which is in same page...... <html> <head>... the action also in the form.............   how can i get the value without
how to use image tag in jsp
how to use image tag in jsp  How to use image tag in JSP
How to use Java Beans in JSP?
How to use Java Beans in JSP?  Hi, I have developed a employee bean...; ..... } Please tell me how I can use Employee Java bean in JSP page? Thanks   Hi, Read at Java Bean in JSP. Thanks   hi dude your qus
Advertisements
 

 

 

DMCA.com