Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within HTML Pages with CSS and JavaScript
Search Coderanch
Advance search
Google search
Register / Login
This week's book giveaway is in the
Design
forum.
We're giving away four copies of
Experimentation for Engineers: From A/B testing to Bayesian optimization
and have David Sweet on-line!
See
this thread
for details.
Win a copy of
Experimentation for Engineers: From A/B testing to Bayesian optimization
this week in the
Design
forum!
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Ron McLeod
Tim Cooke
Paul Clapham
Liutauras Vilda
Sheriffs:
Junilu Lacar
Rob Spoor
Jeanne Boyarsky
Saloon Keepers:
Stephan van Hulst
Carey Brown
Tim Holloway
Piet Souris
Bartenders:
Forum:
HTML Pages with CSS and JavaScript
how to enable and disable in a multiple row only to click a checkbox,radio button?
Rd Dari
Ranch Hand
Posts: 214
I like...
posted 11 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi all,
<%-- Document : place_order_product Created on : Aug 3, 2011, 11:38:03 AM Author : Administrator --%> <%@page contentType="text/html" pageEncoding="UTF-8" import="java.util.*,java.sql.*,src.*" session="true"%> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Place Order</title> <link rel="stylesheet" href="stylesheet/fac_css.css"/> </head> <script type="text/javascript"> function checkButtion(field) { for(var i=0;i<field.length;i++) { if(document.getElementById("chk1").checked) { field[i].checked=true; /* document.getElementById("text1").disabled=false; document.getElementById("text2").disabled=false; document.getElementById("text3").disabled=false;*/ } else { field[i].checked=false; /* document.getElementById("text1").disabled=true; document.getElementById("text2").disabled=true; document.getElementById("text3").disabled=true;*/ } }//checkText(text); } /*function checkPerButton() { //for(var j=0;j<len.length;j++){ if(document.getElementById("chk2").checked) { document.getElementById("text1").disabled=false; document.getElementById("text2").disabled=false; document.getElementById("text3").disabled=false; } else { document.getElementById("text1").disabled=true; document.getElementById("text2").disabled=true; document.getElementById("text3").disabled=true; } }*/ </script> <% ArrayList arr=null; arr=(ArrayList)session.getAttribute("outarray"); System.out.println("Out array in order jsp***** "+arr); JdbcConnection conn=new JdbcConnection(); Connection con=null; ResultSet rs=null; Statement stmt=null; String sql; String society_name=null; String resi_name=null; String flat_no=null; String tower_no=null; %> <body style="min-height: 570px; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; background-color: #f4f4f4;"> <form name="myform" action="Mail_ForVendor" method="post"> <div id="welcome"> <div id="welcome_in"> <div id="welcome_in_left">Vendors</div> <div id="welcome_in_right"> <% String login_user = (String)session.getAttribute("user"); %> <div id="welcome_in_right_right">Welcome: <%=login_user%></div> <div id="welcome_in_right_left"><img src="images/afterlogintop_icon.jpg" width="42" height="30"></div> </div> </div> </div> <div id="container1"> <div style="height:3px; "></div> <% String user=(String)session.getAttribute("username1"); String category=(String)session.getAttribute("category1"); session.setAttribute("username1", user); session.setAttribute("category1",category); System.out.println("User in jsp session************ "+user); System.out.println("Category in jsp session************"+category); %> <table width="600" align="center" cellpadding="0" cellspacing="0" border="0" style="border:2px solid #cccccc;"> <tr> <td class="headingforcopmtop">All</td> </tr> <tr> <td width="30"><input type="checkbox" name="list" id="chk1" onclick="return checkButtion(document.myform.list);"></td> <td width="160" class="headingforcopmtop">Vendor Name</td> <td width="160" class="headingforcopmtop">Services</td> <td width="200" class="headingforcopmtop">Email of Vendor</td> </tr> <%ArrayList al=null; if(arr!=null) { Iterator it=arr.iterator(); while(it.hasNext()) { al=(ArrayList)it.next(); System.out.println("in the while loop " +al); %> <tr> <td width="20"><input type="checkbox" name="list" id="chk2" onclick="return checkPerButton();"></td> <td class="centerfont"><input id="text1" type="text" name="vendor_name" size="18" value="<%=al.get(0)%>"></td> <td class="centerfont"><input id="text2" type="text" name="text1" size="18" value="<%=al.get(1)%>"></td> <td class="centerfont"><input id="text3" type="text" name="email_address" size="25" value="<%=al.get(2)%>"></td> </tr> <%}//WHILE CLOSE arr.clear(); //arr.clone(); // arr=null; // arr.clear(); }//IF CLOSE // arr.clear(); %> <tr> <td colspan="2"> </td> <td class="centerfont" ><input type="submit" name="submit" class="button" value="Submit"></td> </tr> </table> </div> </form> </body> </html>
Thanks in advanced!
Eric Pascarello
author
Posts: 15385
6
posted 11 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
ids are singular, their values can not repeat.
Eric
Don't listen to Steve. Just read this tiny ad:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
set values in a table from other
How to update a image using servlet?
resultset is not working properly
how to getSession in simple java class?
How to set timer for select the time am to pm on front end in a jsp page like calender for date?
More...