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



Home Answers Viewqa JSP-Servlet calling java method from html form with out using javascript
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


phaniraghav
calling java method from html form with out using javascript
1 Answer(s)      6 years and 6 months ago
Posted in : JSP-Servlet


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


Advertisement
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
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 .   ...;center><h3>Registration Form</h3></center> <form method
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
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
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
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
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
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
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
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
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
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... JavaScript deleteTFoot method   
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
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
Calling Flex Function From JavaScript
:Application> To Call Flex method from JavaScript do the following... From JavaScript Sometimes, you may need to call flex function from JavaScript... function callable from javascript. ExternalInterface.addCallback
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
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() { <
html form - Java Beginners
html form  Hi
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
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
PHP HTML Form Method Attribute
Topic : PHP HTML Form Method Attribute Part - 3 The second attribute... used the method post. The data from the form ends up in the address bar and you...%20FORM/basic_form.php Using POST method is the guarantee that the form information won't
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
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
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
Advertisements
 

 

 

DMCA.com