473,666 Members | 2,571 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

struts-javascript

1 New Member
Ciao a tutti, sono nuovo. Ho il problema di recuperare dei campi di struts che si trovano in un iterate indicizzati in una function javascript.

questo è il codice del mio iterate:

-------------------------------------------------------------------------------------
Expand|Select|Wrap|Line Numbers
  1. <% int i = 0; %>
  2. <logic:iterate id = "distribuzione" name = "PolivalenzaPdlcPersoneForm"         property="listaPlde" type="hse.tpi.vo.PdlcPdlePolivalenzeVO" indexId="ctr">
  3.  <tr>
  4.        <td style="display:none;">
  5.     <bean:write name = "distribuzione" property="distPolivalenzeId" />
  6.     </td>
  7.     <input type="hidden" name="distribuzione" property="distPolivalenzeId" indexed="true">
  8.     <td style="display:none;">
  9.     <bean:write name = "distribuzione" property="posizElemId" />
  10.     </td>
  11.     <input type="hidden" name="distribuzione" property="posizElemId" indexed="true">
  12.     <td style="display:none;">
  13.     <bean:write name = "distribuzione" property="personaId" />
  14.     </td>
  15.     <input type="hidden" name="distribuzione" property="personaId" indexed="true">
  16.     <td>
  17.     <bean:write name = "distribuzione" property="posizElemCod" />
  18.     </td>
  19.     <input type="hidden" name="distribuzione" property="posizElemCod" indexed="true">
  20.     <td>
  21.     <bean:write name = "distribuzione" property="posizElemDesc" />
  22.     </td>
  23.     <input type="hidden" name="distribuzione" property="posizElemDesc" indexed="true">
  24.     <td>
  25.     <bean:write name = "distribuzione" property="dataInizio" />
  26.     </td>
  27.     <input type="hidden" name="distribuzione" property="dataInizio" indexed="true">
  28.     <td>
  29.     <bean:write name = "distribuzione" property="dataFine" />
  30.     </td>
  31.     <input type="hidden" name="distribuzione" property="dataFine" indexed="true">
  32.     <logic:equal name="distribuzione" property="stato" value="C">
  33.     <td>
  34.         <bean:write name = "distribuzione" property="frequenzaPercPdle" />
  35.     </td>                    
  36.     <input type="hidden" name="distribuzione" property="frequenzaPercPdle" indexed="true">
  37.     </logic:equal>
  38.     <logic:equal name="distribuzione" property="stato" value="A">
  39.         <td >
  40.             <html:text name = "distribuzione" property="frequenzaPercPdle" maxlength="3" style=" text-align: right;" indexed="true"/>
  41.         </td>
  42.     </logic:equal>
  43.      </tr>
  44.       <% i++; %>
  45.        </logic:iterate>
  46.  
-------------------------------------------------------------------------------------


la mia function javascript è la seguente:

--------------------------------------------------------------
Expand|Select|Wrap|Line Numbers
  1. function confermaPolivalenza(count,form){    
  2.  
  3.     for(var x=0;x<count;x++){      
  4.         alert("frequenza="+(form.elements["distribuzione["+x+"].frequenzaPercPdle"]).value);
  5.     }    
  6.  
  7. }
  8.  
------------------------------------------------------------

vorrei soltanto capire come si riesce a prendere il valore all'indice 'x' dei miei campi property...

grazie
Nov 4 '08 #1
1 1517
acoder
16,027 Recognized Expert Moderator MVP
This is an English language forum. Please translate your post into English. See generally unacceptable things. Thanks.
Nov 4 '08 #2

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

Similar topics

0
2526
by: Paul Symes | last post by:
Hi, I am trying to get Struts 1.1 to run under iPlanet 6.0 (SP4) without any success. When iPlanet attempts to initialise my web application, it raises a multitude of errors dependent on the configuration I am trying. These errors range from not finding the default class for the Apache Logging libs to not finding a class or method in the Struts package. When I tried installing one of the sample webapps provided with the Struts 1.1...
2
3066
by: Eric Schultz | last post by:
Good afternoon... I'm new to struts so I hope I'm not asking an obvious question, but so far I haven't found my answer in any book, web site, or google search. I need to develop an application that outputs primarily in XML (for another application), but also in HTML. I'd like to use the same logic (Actions and Forms) but how do I set my forwards to forward to the correct JSP for the output type?
1
11891
by: Cedric | last post by:
Hello, I'm developping my first Struts application. I've got this error: Cannot find message resources under key org.apache.struts.action.MESSAGE web.xml <servlet> <servlet-name>action</servlet-name>
3
375
by: Sharon | last post by:
Hi guys , What is the apache struts equivalent in the .net world ? (if any ..) Thank you Sharon
0
2264
by: kisc71117 | last post by:
When accessing my JSP I get the following error: org.apache.jasper.JasperException: Missing message for key "button.add" my error message javax.servlet.ServletException: Missing message for key "button.add" org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758) ...
1
2787
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 delegate: false repositories:
3
5393
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 executing action class iam unable to solve it... here is my code FormLogin.java public class FormLogin extends ActionForm{ private String username=null;;
1
14050
by: shrik | last post by:
hi everybody. I have following problem. There are two pages. index.jsp and main.jsp in my application Index.jsp contains logging interface in . It submits password and userid to loginform bean. following are entries in struts-config.xml file <action input="index.jsp" name="loginform" path="/login" scope="session" type="com.myapp.struts.loginaction"> <forward name="success" path="/main.jsp"/>
1
11525
by: NamelessNumberheadMan | last post by:
I can't seem to get Struts 2 validations to work. I have been converting from Strust 1 to Struts 2. So far I've refactored all the code (for this particular module) on the back end, rewrote the jsp using Struts 2 notations, and wired up the xml (aside from the abc-validation.xml). Everything runs just fine. If there is an error not generated by user input (i.e. file format problem) I can get that message to come out, so I know my error messages...
12
77990
lifeisgreat20009
by: lifeisgreat20009 | last post by:
I am a newbie to Struts and JSP...I have been working on the code below for 5 hours now..I googled a lot but couldn't get much help so finally I am here.. Hoping of getting my problem solved. Please give me some idea where I am going wrong ?? I just want to retrieve data from my emp_mstr table and display it using my JSP file... The table emp_mstr is as follows :- CREATE TABLE EMP_MSTR( EMP_NO VARCHAR(10) PRIMARY KEY, PASSWORD...
0
8454
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8363
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8883
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8561
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6203
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5672
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4200
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2013
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1778
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.