Home Answers Viewqa JavaScriptQuestions request this program

 
 


kathiravan
request this program
1 Answer(s)      a year and 11 months ago
Posted in : JavaScript Questions

if three text box value in my program i want to check the three input boxes values and display greatest two values

View Answers

July 22, 2011 at 12:08 PM


<html>
<script>
function check(){
    var n1=document.getElementById("num1").value;
    var n2=document.getElementById("num2").value;
    var n3=document.getElementById("num3").value;

    if((!isNaN(n1))&&(!isNaN(n2))&&(!isNaN(n3))){
        var num1=parseInt(n1);
        var num2=parseInt(n2);
        var num3=parseInt(n3);
        var secondhighest;
        var highest=Math.max(num1,num2,num3);
        if(highest==num1){
           secondhighest=Math.max(num2,num3);
        }
        if(highest==num2){
           secondhighest=Math.max(num1,num3);
        }
        if(highest==num3){
           secondhighest=Math.max(num1,num2);
        }
        alert("Greatest Number: "+highest+" and Second Greatest Number: "+secondhighest);
    }
    else{
    alert("Entered values are not an integer!");
    var n1=document.getElementById("num1").value=" ";
    var n2=document.getElementById("num2").value=" ";
    var n3=document.getElementById("num3").value=" ";
    }
}
</script>
<table>
<tr><td>Enter Number1</td><td><input type="text" id="num1"></td></tr>
<tr><td>Enter Number2</td><td><input type="text" id="num2"></td></tr>
<tr><td>Enter Number3</td><td><input type="text" id="num3"></td></tr>
<tr><td></td><td><input type="button" value="Check" onclick="check();"></td></tr>
</html>









Related Pages:
request this program
request this program  if three text box value in my program i want to check the three input boxes values and display greatest two values
request to help
request to help   how to write the program for the following details in java Employee Information System An organization maintains the following data about each employee. Employee Class Fields: int Employee ID String Name
Request Parameters in JSP
Request Parameters in JSP       In this section, you will study about the various request parameters. HttpServletRequest interface is responsible for providing request
Request Headers in JSP
Request Headers in JSP          Whenever an http client sends a request, it sends the request in the form of get or post method or any other HttpRequest 
Request Headers In EL
Request Headers In EL          Whenever an http client sends a request... in scripting. To access the request headers we need a simple trick, by using
Specific Request Headers in JSP
Specific Request Headers in JSP          Whenever an http client sends a request... to retrieve some of the headers available in the request object. We
How to send NSURLConnection synchronous request on https?
How to send NSURLConnection synchronous request on https?  Hi, Give me program example of NSURLConnection synchronous request on https. Thanks
Request Object In JSP
Request Object In JSP     ... Request object. This object retrieves values whatever client passes to the server by an HTTP request. Let if you submit the html form with some data to be send
JSP implicit object "request"
. The 'request' object takes the value from the web browser and pass it to the server. This is performed using an HTTP request such as: headers, cookies...) getCookies():This method of 'request ' object retrieves all
How to send the request and get the request?
How to send the request and get the request?  how to send a request to a JSP file in another domain in the same server and get the request done i.e how to include JSP file of one domain to another doamin JSP within in the same
not picking request parameters from the front end - JSP-Servlet
not picking request parameters from the front end  hi, This is venkatramana. I am writing one small basic program. I am not getting proper output. As per the code i should get output as Hello welcome to unice:venkat(which name
Request Parameters In EL
Request Parameters In EL     ... program on this. After going through this you will better understand the how to retrieve the parameters in EL   The code of the program is given below
Using Beans And Request Scope
Using Beans And Request Scope     .... request: In this scope bean object is placed in the ServletRequest object for the current request only.. In this example we are making one bean class inside which
request processing in servlets
request processing in servlets  how request processing is done in servlets and jsp   Please visit the following links: JSP Tutorials Servlet Tutorials Here, you will find several examples of processing request
jsp request in struts1
jsp request in struts1  how the request for a JSp is processed in Struts1?Any JsP page in the end a servlet only.where is the URL pattern for this servlet
JSP Request Object
JSP Request Object  JSP Request Object ?   request object... an HTTP request. The request object is used to take the value from the client?s web browser and pass it to the server. This is performed using an HTTP request
request object - JSP-Servlet
request object  What is Difference Between request.getHeader("x-forwarded-for") and request.getServerName() pls give me reply as soon as possible
The $_Request Function
The $_Request Function The contents of both $_GET, $_POST, and $_COOKIE are contained by the PHP built-in $_REQUEST function. $_REQUEST Method is used...;?php echo $_REQUEST["name"]; ?><br /> Address :<?php echo
jQuery Ajax load request
jQuery Ajax load request  Hi, How to use jQuery to send the request on server to load data in web page? Thanks   Hi, In the jQuery Load Content tutorial you will find the code example to send request on server
Session Object from request
request object? Why are we adding cookie object into response object? Why are we getting cookie object from request object? I know all methods are available its relevant class. is there any reason for getting session object from request
request object value
request object value  Hi Friends I am developing a web application... request object value for whole application. Problem is..envirement session... request value for whole application without using session,application object. Please
Snoop in jsp
;    It mostly contains the request information, ServletContext initialization parameters, ServetContext attributes, request headers, response headers etc.     The code of the program is given below:  
JMeter HTTP request example
JMeter HTTP request example  Concerning: http://www.roseindia.net/jmeter/using-jmeter.shtml how do I set path? also what do i need to do to get the helloworld servlet work? Thanks in advance
request for java source code
request for java source code  I need source code for graphical password using cued-click points enabled with sound signature in java and oracle 9i as soon as possible... Plz send to my mail
Request for Discussion forum in jsp
Request for Discussion forum in jsp  Hi i want discussion forum to my project. Can anyone tell me, what are all requirements needed to create it. THanks in advance
Request for codes - JSP-Servlet
Request for codes  Sir , I am an engineering student i am interested in learning JAVA also i need some example code for creating Registration form codes for creating web based application using JSP sir plz send me which
Ajax request object
Ajax request object  i have to open more than one time a same jsp page with same input using Ajax.. But it will be opened only one time. i can open If i give different input.. how to solve this problem
Check if parameter exists in servlet request
= ""; String request_status = ""; String pend_request_type=""; String pend_request_date=""; String pend_request_data...;Add"; int pend_request_id = 0; if(request.getParameter("emp_id"
Problem in request object
Problem in request object  I have created a form where I have file...=null; String description=null; String path1=null; out.println(request); path1...(); int update=0; boolean isMultipart = ServletFileUpload.isMultipartContent(request
Problem in request Object
Problem in request Object  I have created a form where I have file input along with other inputs. I am using jsp to process the inputs. File input is not processing while the rest of the data is being processed.Please Help me out
JSP Request Dispatcher
JSP Request Dispatcher   ... the RequestDispatcher class to transfer the current request to another jsp page. You can... transfers the request using the getRequestDispatcher("/form.jsp"
request header and response - Java Beginners
request header and response  count the hits of a user on a site
simple ajax Request and Response code...
simple ajax Request and Response code...  var request=null; if (window.XMLHttpRequest) { request = new XMLHttpRequest(); } else if (window.ActiveXObject) { request = new ActiveXObject("Microsoft.XMLHTTP"); } if(request
jsp program - JSP-Servlet
jsp program  1.write a servlet program that finds out the given... an application in jsp to redirect the request to any other page.  Hi Friend... HttpServlet { public void doPost(HttpServletRequest request
request header and response - JSP-Servlet
request header and response  Create aservlet that redirects a client to a.html if its morning ,to b.html if its a afternoon else to c.html.
request dispatcher - Java Interview Questions
request dispatcher  what is the getrequestdispatcher... RequestDispatcher getRequestDispatcher(java.lang.String uri) Returns a request dispatcher..."); disp.include(request, response); ServletRequest to return a request
how to display response in request page
how to display response in request page  Sir/Mom, My request page have three text boxes. Enter register number in the first box then click the submit button.This time shows the name and mark to display the second and third boxes
jsp/servlet login program
;/TITLE></HEAD> <BODY> <jsp:useBean id="db" scope="request" class...; </html> When I run the program, I get an error: The requested resource
How JSP Forwards a request
How JSP Forwards a request       In this section you will study how jsp forwards a request.  The <jsp:forward>  forwards the request information from one resource
request linux cd - Development process
request linux cd  how can i get free linux cd  well... you can find the details at http://www.roseindia.net/linux/ Services are available only in India. Thanx
Submit a Request for a Project to be done
Fill this form to Submit a Request for a Project to be done. Our development team will shortly contact you.   Visit Services section to submit your project details
getQueryString() Method Of The Request Object
getQueryString() Method Of The Request Object... the getQueryString() method of the request object. Here, you will learn more about the getQueryString() method of the request like what's the need
removeAttribute() Method Of The Request Object
removeAttribute() Method Of The Request Object... for the method removeAttribute() of the request object. This method removes... the removeAttribute() method of the request object in JSP by learning through
program
program  any program of hotel or school management
java program to exchange soap message
and client side program in order to send the request. Any sample programs...java program to exchange soap message  Hi Friends, I want... a set of 15 parameters and program on web server side receives this 15 parameters
Program Urgent - JSP-Servlet
Program Urgent  Respected Sir/Madam, I am R.Ragavendran. I am in urgent need of the coding. My requirement is as follows: Beside Enter Employee ID... not support HTTP Request") return } var url="getuser.jsp" url=url+"?emp
Java Script Program
() that prevented it from fulfilling this request. exception