Eswaramoorthy
Html / Java Script
1 Answer(s)      3 years and 3 months ago
Posted in : Development process

Hi There,
in my form there are ten text boxes. my requirement is that when i click checkbox,the values of first five textbox has to copy to next five.
I need jscript for that
View Answers

April 1, 2010 at 2:53 PM


Hi Friend,

Try the following code:

<script>
function convertField(){
if (document.form.check.checked){
var d1=document.form.text1.value;
document.form.text6.value=d1;
var d2=document.form.text2.value;
document.form.text7.value=d2;
var d3=document.form.text3.value;
document.form.text8.value=d3;
var d4=document.form.text4.value;
document.form.text9.value=d4;
var d5=document.form.text5.value;
document.form.text10.value=d5;

}
}
</script>
<form name="form">
<table>
<tr><td>TextField 1</td><td><input type="text" name="text1"></td></tr>
<tr><td>TextField 2</td><td><input type="text" name="text2"></td></tr>
<tr><td>TextField 3</td><td><input type="text" name="text3"></td></tr>
<tr><td>TextField 4</td><td><input type="text" name="text4"></td></tr>
<tr><td>TextField 5</td><td><input type="text" name="text5"></td></tr>
<tr><td>TextField 6</td><td><input type="text" name="text6"></td></tr>
<tr><td>TextField 7</td><td><input type="text" name="text7"></td></tr>
<tr><td>TextField 8</td><td><input type="text" name="text8"></td></tr>
<tr><td>TextField 9</td><td><input type="text" name="text9"></td></tr>
<tr><td>TextField 10</td><td><input type="text" name="text10"></td></tr>
<tr><td><input type="checkbox" name="check" onClick="convertField();" ></td></tr>
</table>
</form>

Thanks









Related Pages:
Java Script
Java Script  What is Java Script? How to learn Java Script?   Hi Java Script is client side programming language. It runs on browser.... You can learn Java Script from our JavaScript - JavaScript Tutorial pages
Html / Java Script - Development process
Html / Java Script  Hi There, in my form there are ten text boxes. my requirement is that when i click checkbox,the values of first five textbox has to copy to next five. I need jscript for that  Hi Friend, Try
java script - Development process
java script  hi.. how to get previous and next buttons inside the table in the same page as like our mails in the inbox.  Hi Friend, Try the following code: ID Name Address Contact
Java Script Program
Java Script Program  <%-- Document : index Created... contentType="text/html" pageEncoding="UTF-8"%> JSP Page... are available in the Sun Java System Application Server 9.1 logs. Sun Java System
Java Script Program
Java Script Program  <%-- Document : index Created... contentType="text/html" pageEncoding="UTF-8"%> JSP Page... are available in the Sun Java System Application Server 9.1 logs. Sun Java System
please send me java script for html validation - Java Beginners
please send me java script for html validation  please send me code for javascript validation .........please send me its urgent a.first:link { color: green;text-decoration:none; } a.first:visited{color:green;text
Example program to pass value from Html to java script
Example program to pass value from Html to java script... html code to java script easily. To show this we have created an example Html page...() in our example html page it pass it to the java script of the page
java script - JSP-Servlet
java script add items  How to add items in an array in JavaScript?  Hi friend,<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01... in javascript</title><script type="text/javascript" src="mtmcode.js
java script - JSP-Interview Questions
java script  i want that my registration page shud be get poped up when i will clik a on a link on my login page....how can i do it using java script or i shuld use html
stuts java script validation is not working.
stuts java script validation is not working.  hello my stuts client... and validation.xml file's code. pls help --of jsp page-- > <html:form action...; <html:javascript formName="logonForm"/> > Enter
Progress Bar implementation in Java Script
Progress Bar implementation in Java Script  Hi Friend, I am new to Java Script, but i want implement the progress bar in my html by reading the value from file (like value=30) and the value in file be changing from 0 to 100
stuts java script validation is not working.
stuts java script validation is not working.  --of jsp page-- Enter name: Enter pass: <html:submit/> --of validation.xml-- <form name="logonForm"> <
stuts java script validation is not working.
stuts java script validation is not working.  --of jsp page-- Enter name: Enter pass: <html:submit/> --of validation.xml-- <form name="logonForm"> <
stuts java script validation is not working.
stuts java script validation is not working.  hello my stuts client...-- Enter name: Enter pass: <html:submit/> </html:form> --of validation.xml-- <form name
java script validation - Java Beginners
java script validation  how to do validations in j s p thru java script  Hi friend, Code to create a jsp page "contact.jsp...://www.javascript-coder.com/html-form/javascript-form-validation.phtml go to that site
Java script
Java script  Source code for capturing the screen using Java Script
Java Script
Java Script  why we are using java script
Java Script
Java Script  Hi, Any one please share a code to swap the 2strings using java script
java script
java script  how to write a Java script program to enter number in two text fields and then automatically display the total in another text field
java script
java script  Hi, Any one please tell me how, to store below elements in an array using java script 12,13,14,a,b,xyz
Java script
Java script  a java script code for accept 10 numbers from the user and print in the descending order without using sort method
java script code problem - Java Beginners
java script code problem  Dear sir, my problem is that, suppose i've two HTML files(with java script), out of them one has function EMPLOYEE_DETAILS() i want to call this EMPLOYEE_DETAILS() fuction to another Html file, how
Java Script.
Java Script.  Hi Sir, The below java script code is not working in Google chrome can yo give me the solution as soon as possible. <script type="text/javascript"> function setValue(){ var val=""; var frm
Java Script.
Java Script.  Hi Sir, The below java script code is not working in Google chrome can yo give me the solution as soon as possible. <script type="text/javascript"> function setValue(){ var val=""; var frm
Java Script.
Java Script.  Hi Sir, The below java script code is not working in Google chrome can yo give me the solution as soon as possible. <script type="text/javascript"> function setValue(){ var val=""; var frm
Java Script.
Java Script.  Hi Sir, The below java script code is not working in Google chrome can yo give me the solution as soon as possible. <script type="text/javascript"> function setValue(){ var val=""; var frm
Error Handling in Java Script
Error Handling in Java Script  ... will Learn how to handle error in java script. JavaScript is scripting language used...; <head> <script language="javascript">
java html
java html  program for jsp    --Select...-Type" content="text/html; charset=UTF-8"> <title>JSP Page<..." /> <script lang="javascript"> function search
javascript script tag fields - Java Beginners
javascript script tag fields  hi all, i wanted to know what is meaning of type property in javascript script tag? In most cases we write type... of tag specifies the MIME type of a script. Javascript is the default scripting
Java Script.
Java Script.  The below code is nit working in Google chrome can any one tell me the solution as soon as possible. <script type="text/javascript"> <!-- function setValue(){ var val=""; var frm
java script
java script  how will you identify whether the number entered by the user has two digits or three digits.Assuming that the user enters only a three digit or two digit number.   <HTML> <HEAD> <SCRIPT
java script
java script  write a java script code which provide a menu for user which will enable him/her to either add or subtract or multiply or divide two numbers and produce the corresponding result.   <html> <
java script
java script  when you click a button how will you change the background color of a web page
java script
java script  I want to display set of radio buttons after i select one option of the combobox
java script
java script  what is the use of getElementById() method in jsp. and give me its full knowledge with a example
Java Script Code Problem - JSP-Servlet
Java Script Code Problem  how to concatenate html table values(there are 3 rows,each row contains 3 fields) into variable and display it using javascript  Hi Friend, Try the following code: document.write
java script
java script  hi deepak, i have small doubt in the date ranges that when i select the date range then it display on the text boxes. example:suppose i select the weekly date range then the dates are display on the text boxes up
Java Script
Java Script  I want to display an error message for the validation of email at the top of the page in red font i want to use java scripts but i dont want to use alert box what i need to do   <html> <script>
java script - Design concepts & design patterns
JavaScript in HTML  How can i integrate the JavaScript Code into HTML?  hi friend,<html><head><SCRIPT language="JavaScript1.2">function poponload(){testwindow= window.open (""
Html
Html  in the web page if judge select the age and category then automatically under that conditions the details will be display in the form of grid give me that code in html and java
Html
:48:44 PM Author : SAMSUNG --%> <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01...; <head> <meta http-equiv="Content-Type" content="text/html
Html
:48:44 PM Author : SAMSUNG --%> <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01...; <head> <meta http-equiv="Content-Type" content="text/html
Html
Html  i am select the dateofbirth through the html browser.but it can not save into the sql server 2008 database.any special code required to store the date in database by using java servlets
Java Vs Script
Java Vs Script       The Java  and Java Script are completely different from each other... Java  and Script language in more detail Java Java is completely object-oriented
HTML
the file give me the code for this in html and java...HTML  in html how can we can upload the file <tr> <td><strong>Video of the work:</strong> <td><b>
html
html   HTML document with Javascript to count the number of vowels... is the code ..I hope this will solve your problems : <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE>
Html
Html  can we send data from one html page to another html page? if yes how?   Yes, using javascript. 1)page1.html: <html> <form...: <html> <script LANGUAGE="JavaScript"> function getParams() { var idx
HTML
where i can store in the database SEND ME THE CODE FOR THIS IN JAVA AND HTML
HTML
;strong>Start Date :</strong> <td><script language="javascript" src="cal2.js"> /* Xin's Popup calendar script- Xin Yang (http://www.yxscripts.com/) Script featured on/available at http://www.dynamicdrive.com