473,405 Members | 2,415 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Javascript to select struts component

hi all,

I am using the following code in my jsp page
Expand|Select|Wrap|Line Numbers
  1. <logic:iterate id="subregionListId" name="carsearchForm" property="subregionList" indexId="index">
  2. <span class="nowrap">
  3. <html:checkbox styleClass="checkbox" name="subregionListId" property="isSelected" indexed="true"/>
  4. <bean:write name="subregionListId" property="prefecture"/></span>    
  5. <html:hidden name="subregionListId" property="prefecture" indexed="true"/>                                                                    
  6. <html:hidden name="subregionListId" property="prefectureCode" indexed="true"/>    
  7. </logic:iterate>
  8.  
i want to select this checkboxes through my javascript code. Please guide me on this
Apr 16 '07 #1
2 1836
acoder
16,027 Expert Mod 8TB
How does this turn out in HTML?

To select (check) a checkbox, set the checked property to true, see link.
Apr 16 '07 #2
you can look up the STRUTS reference library here for more info http://struts.apache.org/1.x/userGuide/index.html

but the easier answer is you need to add a property to your checkbox tag,

Expand|Select|Wrap|Line Numbers
  1. <html:checkbox styleClass="checkbox" name="subregionListId" property="isSelected" styleId="yourid" indexed="true"/>
and you can use this as you would in a normal html tag.

ie,

using the javascript prototype library,

$("yourid").checked=true
Apr 16 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Alex M | last post by:
I'm trying to use the jakarta struts client side javascript validators and the validators are working, but they are not showing the popup messages. I have the message keys defined in the...
3
by: sancha | last post by:
Hi, i am in a bit of a delima here. I need to submit an action through javascript so i used document.forms.action='/search.do?&submitaction=Add Minus' document.forms.submit(); since i am...
3
by: PromoteDirect | last post by:
Newsgroups: comp.lang.javascript Subject: access denied when trying to pass data between jsps Date: Thu, 09 Mar 2006 10:42:01 -0800 I have two jsp applications. One written with struts and one...
1
by: JumpingOffPlace | last post by:
Hi, I'm hoping that the wealth of knowledge here can stop me from spinning my wheels on this syntax error for hours. :) Below is the code, and the error I am recieving.... Code: <!DOCTYPE...
5
by: =?iso-8859-1?q?Jean-Fran=E7ois_Michaud?= | last post by:
Hello, I've been trying to figure something out for the past few days and I can't seem to pinpoint what I'm doing wrong. I've been trying to call javascript from inside a <logic:equal>, but...
1
by: nithiya sri | last post by:
i am new to struts.I try running struts application in Eclipse with the tomcat plug in .. it shows the following error:; please help me in this... SEVERE: Error loading WebappClassLoader ...
3
by: shanmukhi | last post by:
hi all, i got a problem with struts. iam unable to find it. i have written an action class, form bean class and a jsp page on submitting form, request is going to action class but it is not...
0
by: Veeraj | last post by:
Hi all First i am Mohanraj Veera and Currently i am trying to use Display Tag plugin for Creating Table Component and Export options in Struts.I got the table component and export options succesfully...
1
by: kaj28121980 | last post by:
I have a typical senario. My Web component provides action for database backup and restore. while user wants to backup or restore database the user is logged out and redirected to the login page and...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.