calling java method from html form with out using javascript

calling java method from html form with out using javascript

How can i call java method from a HTML form, java script should be disabled?

View Answers

April 16, 2008 at 7:30 PM

Hi


<html>
<head>
<title>Test Input Validation</title>
<script LANGUAGE="JavaScript">
function testResults(form) {
TestVar = isNumberString(form.inputbox.value)
if (TestVar == 1)
alert ("Congratulations! You entered only numbers");
else
alert ("Boo! You entered a string with non-numbers characters");
}

function isNumberString(InString){
if(InString.length==0)
return (false);
var RefString="1234567890";
for (Count=0; Count < InString.length; Count++) {
TempChar= InString.substring(Count, Count+1);
if (RefString.indexOf (TempChar, 0)==-1)
return (false);
}
return (true);
}
</script>
</head>
<body>
<form name="myform">
<b>Enter a string with numbers only: </b><br/>
<input type="text" name="inputbox" size="30">
<input type="button" name="button" Value="Click" onClick="testResults(this.form)" >
</form>
</body>
</html>










Related Tutorials/Questions & Answers:
calling java method from html form with out using javascript - JSP-Servlet
calling java method from html form with out using javascript  How can i call java method from a HTML form, java script should be disabled?  ...;script LANGUAGE="JavaScript">function testResults(form
Calling java class method from javascript
Calling java class method from javascript  I want to call a java class method from javascript. The java class method is like "public String[] getWord()". I want to assign this string array value to a variable in javascript. I
Advertisements
Calling In JavaScript Functions from HTML Form To Validate User Entered Data
Calling In JavaScript Functions from HTML Form To Validate User Entered Data  Hello, I have been working for days on my web Form assignment and editing my html to call my functions to validate the user entered data
Html form using JavaScript to display the table content
Html form using JavaScript to display the table content  HI There, Greetings, I am new to this java and I need your assistance. I have created... want to write a Html JavaScript coding to display the content from database
Error in calling javascript function from java
Error in calling javascript function from java  I am callin javascriot function from applet and getting error netscape.javascript.JSException: Unexpected error: This method should not be used unless loaded from plugin.jar
Sending form data from HTML page to SQLserver 2005 database by calling servlet code
Sending form data from HTML page to SQLserver 2005 database by calling servlet... from html page to database by calling servlet code from html page .   ...;form method="post" action="http://localhost:8080/examples/Registration"> <
how to pass form values from javascript of html page to jsp page
how to pass form values from javascript of html page to jsp page   This is my sample html page which contains inline javascript which calculates... to submit all the form values with lattitude and longitude returned from
storing date from html form to oracle 10g using servlet
storing date from html form to oracle 10g using servlet  i have following html form from where date,month and year is retrieved separately.. <... this date month year from html form into oracle 10g database where i have
storing date from html form to oracle 10g using servlet
storing date from html form to oracle 10g using servlet  i have following html form from where date,month and year is retrieved separately.. <... this date month year from html form into oracle 10g database where i have
calling method - Java Beginners
calling method   class A{ public void fo(){ class B... static void main(String args[ ]){ } } I Want to call method fo1() from class D without changing anything in class A.  Hi Friend
Html form validation using jquery
Html form validation using jquery  Hi i am using form with html. Form elements like textbox, radio,checkbox,listbox i was used now how to validate the elements using submit jquery option
Hi how to transfer table data from html page to excel sheet by using javascript .
Hi how to transfer table data from html page to excel sheet by using javascript .  html page to excel sheet by using javascript and i dont want to transfer all rows in table, i want to hide some rows in excel sheet. Please send
how to load values of html form into an excel table using java servlet?
how to load values of html form into an excel table using java servlet?   i have written a java servlet program, which has a html form to be filled. after filling the form the servlet generates a receipt and the values should
how to update values of a html form into an excel table using java servlets?
how to update values of a html form into an excel table using java servlets?  i have written a java servlet program, which has a html form to be filled. after filling the form the servlet generates a receipt and the values should
HTML form validation using jquery
HTML form validation using jquery  Is there any way for validating html elements common under a class by giving its class name in jquery validation code..that means validating all elements by using its class name if those
How to get the text from textarea in HTML and store it in database using javascript and jsp
How to get the text from textarea in HTML and store it in database using javascript and jsp  How to get the text from textarea in HTML and store it in database using javascript and jsp <script> function str() { <
JavaScript deleteTFoot method
then we can delete this table footer by calling the JavaScript method with the table object. Syntax for using deleteTFoot() method is as follows: Syntax:ADS... JavaScript deleteTFoot method   
calling a javascript function by passing multiple values from applet in web application
calling a javascript function by passing multiple values from applet in web application  Hi all, I have a requirement like this, I have to call a javascript function from JApplet by passing 3 values. I am new to Applets
JavaScript clearTimeOut method
JavaScript clearTimeOut method       JavaScript's HTML DOM window object method clearTimeOut() method is used to stop or clear the time out variables value
passing textbox value from one page to another page using html n javascript
passing textbox value from one page to another page using html n...; <form type=get action="page2.html"> <table> <tr> <td>...)page2.html: <html> <script LANGUAGE="JavaScript"> function getParams
Hide show HTML forms using javascript
Hide show HTML forms using javascript  How to hide a HTML form in my application using JavaScript?   HTML Code to create checkbox <...;div id="yourDiv"> ...other forms... </div> JavaScript function to hide
how to print HTML using javascript or Jquery
how to print HTML using javascript or Jquery  is there any way to print a document(created using Html and javascript) without using window.print... single method/code to work for both browser
How to export data from html to excel sheet by using java
How to export data from html to excel sheet by using java   How to export data from html to excel sheet by using java
How to export data from html file to excel sheet by using java
How to export data from html file to excel sheet by using java   reading the data from Html file
calling a session bean bean from servlet using netbeans - EJB
calling a session bean from servlet using netbeans  How to call a session bean from servlet using netbeans in Java
Calling Flex Function From JavaScript
</mx:Application> To Call Flex method from JavaScript do... From JavaScript Sometimes, you may need to call flex function from JavaScript... function callable from javascript. ExternalInterface.addCallback
How to export data from html file to excel sheet by using java
How to export data from html file to excel sheet by using java    How to export data from html file to excel sheet by using java
Store image from html img tag into mysql db using java
Store image from html img tag into mysql db using java  Hi. How to get the image displayed in the < img > tag of HTML and store it in the mysql database using java? Thanks in advance
example of 1700 bir form using html
example of 1700 bir form using html   example of 1700 bir form using html i don't know how to start it... i'm confused on what would i do first and what would i use... :( please help me on this.... thank you in advance
PHP HTML Form Method Attribute
Topic : PHP HTML Form Method Attribute Part - 3 The second attribute in the form tag is Method. With the help of Method attribute, we can tell the browser...%20HTML%20FORM/basic_form.php Using POST method is the guarantee that the form
JavaScript reset() method
: By using Reset button of HTML By using reset() method of JavaScript Example... of JavaScript we have created a simple HTML page into which we have created a form... JavaScript reset() method      
flowcharts using javascript/HTML - Development process
flowcharts using javascript/HTML  Hi I want to create flowchart diagram using html/javascript.. is that possible.. please guide me Thanks!  Check this linkhttp://www.roseindia.net/jdbc/jdbc-driver-and-its-types.shtml
How to change the value of a variable which is set in jsp (by jstl method) by calling the function from js?
) by calling the function from js?  How to change the value of a variable which is set in jsp (by jstl method) by calling the function from js? I set the value in jsp by using jstl method for eg:'<'c:set var="name1" value="Add User
how to write a jsp form using html
how to write a jsp form using html  hi, i have written the code...; <body> <form method="POST" action="Form1.jsp"> EmployeeNo: <...;/head> <body> <form method="POST" action="http://localhost
Uploading file in servlet from a html form
Uploading file in servlet from a html form  Sir, I want to upload a picture from my html file and save it to my database as BLOB,but what JAR should... this process without using a third party JAR, just using Java API. please help
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... from form and stores it in User--%> String Pword = request.getParameter
html form - Java Beginners
html form  Hi, I wnt to design a form with more than one action in submit button.thanks. regards, sakthi  Hi friend, You specify your main requirement of form with more then one action. Thanks
HTML form - Java Beginners
HTML form   Hi, thank u for fast reply. I have two forms (form1 and form 2)with several fields in html. When i click the submit button, it validates all fields then moves to form2. i have a problem with form navigation. i
html form - Java Beginners
html form  Hi
JavaScript blink method
JavaScript blink method     ... this functionality with the JavaScript we can use simple blink() method. We have... have created a simple html page and in JavaScript we have created a string
Without Using Form in Java Script
Without Using Form in Java Script  HOw to Reset the data in javascript without using form tag
On HTML and JavaScript - Java Beginners
slection box using in javaScript Select Date and month using...On HTML and JavaScript  Hi I have a SelectBox for ex i want to select a month from selectbox I want the default value of select box to be select
How to retrieve array values from html form to jsp?
How to retrieve array values from html form to jsp?  Hi! I am... it into jsp. Means i just want to retrieve values from html form containing array..., To get an array values from the html form you can use the getParameterValues
create a string from an array using JavaScript
create a string from an array using JavaScript  How to use "join()" to create a string from an array using JavaScript
how to validate the telephone number without using jquery in html with javascript
how to validate the telephone number without using jquery in html with javascript  how to validate the telephone number without using jquery in html with javascript
HTML Post Form
to send the form data in the form of message. The Post method in HTML is used... The Tutorial illustrates an example from HTML Post Form. In this Tutorial, the code explain... HTML Post Form      
How to display user entered information using HTML and JavaScript
How to display user entered information using HTML and JavaScript. We are going to describe How to display user entered information using HTML and JavaScript. First of all we have created HTML form with two text fields "
mini project using html,javascript and ms access with source code
mini project using html,javascript and ms access with source code  I want a mini project which uses html and java script and backend as ms access with source code. plz send its important and urgent
Accessing MS ACCESS databse using a HTML webpage [created using Javascript]
Accessing MS ACCESS databse using a HTML webpage [created using Javascript]  HI team, This is Srinivas, and I have a query and i explained here... I have to save some datas in an MS ACCESS database file [*.mdb], after
Displaying the values in text fields of a form from a javascript function in jsp
Displaying the values in text fields of a form from a javascript function... to call a javascript function by passing 3 values from applet. And i have to display these values in 3 text fields of a form in the current web page. Here form

Ads