i use HTML in jsp

i use HTML in jsp

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
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
Advertisements
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 - 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-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
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
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
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
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
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
HTML tags in JSP
; <html> <head> <title>Use of html tag in jsp code</title>...; COLOR="#660033">Use of html tag in jsp code</FONT> <table...HTML tags in JSP      
should i learn jsp in 2018
should i learn jsp in 2018  Hi, I have just completed Java programming after my science graduation. I want to learn JSP and Servlet. Is it worth to learn JSP in 2018? should i learn jsp in 2018? Thanks   Hello, Yes
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
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:ADS_TO_REPLACE_1 <%@ page import="java.sql.*"%> <% Class.forName
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&
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
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
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
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
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
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
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
How to pass parametes from JSP page to HTML page? - JSP-Servlet
How to pass parametes from JSP page to HTML page?  Hi all, In my project I have one JSP page and one HTML page. In JSP page I have created HTML... with the username in HTML which I have called in JSP page. So I just want
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
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
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
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
JSP,JDBC and HTML(Very Urgent) - JSP-Servlet
the code: I am not using any html. I used only jsp & jdbc. HOme Page...JSP,JDBC and HTML(Very Urgent)  Respected Sir/Madam, Thanks... details from database using JDBC and JSP. The home page i.e HTML Page must contain
Jsp error when i run this a jsp file
Jsp error when i run this a jsp file  hi I got this error when i run the jsp file in IDE and outside also please help me java.lang.NullPointerException org.apache.jsp.insertjsp.jspInit(insert_jsp.java:22
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
jsp or sevlet and html form to send picture to database - JSP-Servlet
jsp or sevlet and html form to send picture to database  Hello guys... that contains his picture to database. What I need are html page for the form that will browse for the picture, jsp or servlet that the info from html will go
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
HTML(Registration form) to Jsp to stored into MS ACCESS database
HTML(Registration form) to Jsp to stored into MS ACCESS database  i am sending one html file that contain 18 fields these are stored in ms-access database by using jsp code.i want to urgent jsp code. please urgent sir. thank
Include Static HTML Page in JSP
Include Static HTML Page in JSP   ... html page in jsp. In JSP, there are two ways to include another web resource. 1. include directive and  2. jsp:include element.ADS_TO_REPLACE_1 Using
Html/JavaScript code - JSP-Servlet
Html/JavaScript code  I have 2 JSPs JSP1 and JSP2. 1.in JSP1 i have a table being displayed using the tag and cells in it contain links(huge... here is that i am not able to be redirected to the corresponding page and highlight
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
i want to pass Javascript value to JSP scriptlet..
i want to pass Javascript value to JSP scriptlet..  i am having a problem that, i am having a combo box in the JSP page when i select an item from... now i want to pass this value to JSP scriptlet
to run html code in web browser - JSP-Servlet
to run html code in web browser  how to run jsp file which calls html file on web browser??  Hi Friend, Try the following code: 1)form.jsp: Enter Name: 2)welcome.html: Add Profile Edit
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
I want design samples for JSP project
I want design samples for JSP project  Sir, I world Like to do a project in jsp techonology. But i have no idea of selecting the project, especially if i selected any project i have no idea that is how to build ie how to design
Html+jsp+database is enough to do the small operation
Html+jsp+database is enough to do the small operation  Hai , If u want to do simple insetion and data retrival operation throw jsp ?.you need not to bother about whole code.just u consentration on html,ajax,jsp,any db.here i
How i write a function/method in jsp?
How i write a function/method in jsp?  How write the function/method in jsp? Using that method i can retrieve the value coming from database. give me example plz. Actually i want to show the list of user detail
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
can i remopve a jsp web page - JSP-Interview Questions
can i remopve a jsp web page  Dear, I ask you a question BUT you do noit answer me: My question Can I remove .jsp and the program still working because it generates .class file. Regards
i need the source code to generate id in jsp
i need the source code to generate id in jsp  hai,i need the source code for generate id...which is i need to generate the new id from the maximum+1,like automatically when i click the button...as well i have several kinds
how to write a jsp form using html
how to write a jsp form using html  hi, i have written the code as below... but it is showing error. please help me how to resolve it. .html file...; </form> <p></body> </html> .jsp file <
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

Ads