Question

I have to change my JavaScript code to java code. it's to validate that one checkbox...

I have to change my JavaScript code to java code.

it's to validate that one checkbox is at least checked.

here is my JavaScript:

if (this_form.RTW3.checked)

               {

        if ((this_form.LimitationsBending.checked !=true) && (this_form.LimitationsClimbing.checked != true) &&

            (this_form.LimitationsEnvironment.checked !=true) && (this_form.LimitationsKneeling.checked != true) &&

            (this_form.LimitationsLifting.checked !=true) && (this_form.LimitationsHeavyEquipOper.checked != true) &&

            (this_form.LimitationsMotorVehicleOper.checked != true) && (this_form.LimitationsProtectEquip.checked !=true) &&

            (this_form.LimitationsSitting.checked !=true) && (this_form.LimitationsStanding.checked != true) &&

            (this_form.LimitationsPublicTrans.checked !=true) && (this_form.LimitationsUpperExtremities.checked != true) &&

            (this_form.LimitationsOther.checked !=true))

        {

                                             alert("At least one limitation is required.");

                                             this_form.LimitationsBending.focus();

                                            this_form.LimitationsBending.position();

                                             return false;

                              }

               }

 

0 0
Add a comment Improve this question Transcribed image text
Request Professional Answer

Request Answer!

We need at least 10 more requests to produce the answer.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the answer will be notified once they are available.
Know the answer?
Add Answer to:
I have to change my JavaScript code to java code. it's to validate that one checkbox...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
  • In java given the following code how would I validate that that upper case & lower...

    In java given the following code how would I validate that that upper case & lower case letters are are ignored and accepted as the same? // TODO add your handling code here: String name = nameTextField.getText().trim(); if(name.isEmpty()){ JOptionPane.showMessageDialog(this, "Username field is empty. Please correct."); return; } if(name.indexOf(" ")!=-1){ JOptionPane.showMessageDialog(this, "Username field cannot contains space in it. Please correct."); }

  • I am given an input file, P1input.txt and I have to write code to find the...

    I am given an input file, P1input.txt and I have to write code to find the min and max, as well as prime and perfect numbers from the input file. P1input.txt contains a hundred integers. Why doesn't my code compile properly to show me all the numbers? It just stops and displays usage: C:\> java Project1 P1input.txt 1 30 import java.io.*; // BufferedReader import java.util.*; // Scanner to read from a text file public class Project1 {    public static...

  • I need to complete 3 validation cases in this Javascript code. I need to validate email,...

    I need to complete 3 validation cases in this Javascript code. I need to validate email, phone and street address. How would I go about validating these 3 cases in this code: <!DOCTYPE html> <html> <head> <meta charset="UTF-8" /> <title>Week 10: Regular Expressions</title> <style type="text/css"> span { padding: 2px; } .success { color: #008000; background: #99cc99; } .failure { color: #ff0000; background: #ff9999; } </style> <script type="text/javascript"> function validateInput(form) { var result0 = document.getElementById('result0'), result1 = document.getElementById('result1'), result2 = document.getElementById('result2'),...

  • Create JavaScript to validate the form The form accepts some personal information, item quanitites, and a...

    Create JavaScript to validate the form The form accepts some personal information, item quanitites, and a shipping method. Your task is to ensure that the user inputs the correct data. In particular: The firstName, lastName, address, city, province, and postalCode fields must all have a value. The postalCode field must be 6 digits long The quantity fields for the widgits must contain a number greater than or equal to zero At least one item must be ordered The user must...

  • Create a program via Java that has atleast 8 characters long, one upper case, and one...

    Create a program via Java that has atleast 8 characters long, one upper case, and one lower case, and one digit. here is my code:     public static void main(String[] args)     {         //variables defined         String passwords;         char password =0;                 //settings up password condition to false         boolean passwordcondition= false;         boolean size=false;         boolean digit=false;         boolean upper=false;         boolean lower=false;         //inputting a scanner into the system         Scanner keyboard = new Scanner(System.in);...

  • How can I print the Database table in PHP please ? here I have form for name and email, also I have php code that allow...

    How can I print the Database table in PHP please ? here I have form for name and email, also I have php code that allow user to add his name and email to my database, all I need to print my final database when the user click on submit. <form action="" method="post"> <label>Name :</label> <input type="text" name="name" required="required" placeholder="Please Enter Name"/><br /><br /> <label>Email :</label> <input type="email" name="email" required="required" /><br/><br /> <input type="submit" value=" Submit " name="submit"/><br /> </form>...

  • NEED HELP with HTML with Javascript embedding for form validation project below. I have my code...

    NEED HELP with HTML with Javascript embedding for form validation project below. I have my code below but I'm stuck with validation. If anyone can fix it, I'd really appreciate. ****************************************************************************** CODE: <!DOCTYPE html> <!-- To change this license header, choose License Headers in Project Properties. To change this template file, choose Tools | Templates and open the template in the editor. --> <html> <head> <title>Nice</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <script> var textFromTextArea; function getWords(){ var text =...

  • Please help with Java programming! This code is to implement a Clock class. Use my beginning...

    Please help with Java programming! This code is to implement a Clock class. Use my beginning code below to test your implementation. public class Clock { // Declare your fields here /** * The constructor builds a Clock object and sets time to 00:00 * and the alarm to 00:00, also. * */ public Clock() { setHr(0); setMin(0); setAlarmHr(0); setAlarmMin(0); } /** * setHr() will validate and set the value of the hr field * for the clock. * *...

  • I need help with my javascript project, I've started on it but I can't seem to...

    I need help with my javascript project, I've started on it but I can't seem to get ym java scripts to work with my index.html. Can someone please help me fix my code? I need the main.js & scratchpad.js to work with my index.html .Thank you Directions: Go to the following link: https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web/JavaScript_basics On that page, scroll down to "A 'hello world' example". Follow the step-by-step instructions to download their code and edit it in your text editor of choice....

  • Python 3. Help please. Here is my current code. What can I do to fix it?...

    Python 3. Help please. Here is my current code. What can I do to fix it? I list=[1,2,2,3,4,5] d = {} for item in list: if item in d: return True d[item] = True return False Exercise 11.4. If you did Exercise 10.7, you already have a function named has_duplicates that takes a list as a parameter and returns True if there is any object that appears more than once in the list. Use a dictionary to write a faster,...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT