• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

problem with <logic:iterate> and with onload function in javascript

 
Ranch Hand
Posts: 41
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a problem in using the logic iterate text field and the onblur java script function.

when i am using the logic iterate test field

<td>$ <html:text name="paymentRecoveryDetailsFVO" property="toBeRecovered" styleId="paymentRecoveryDetailsFVO" indexed="true"/></td>



when i am iterating the text field i have to load the values in the onload function including the values present in the second table where i have already used on load function.
But the problem is i have to load the function even with the text field present in the loop.

for eg: if the index of the loop is 4 then onload final value will be
paymentRecoveryDetailsFVO[0].toBeRecovered=10
paymentRecoveryDetailsFVO[1].toBeRecovered=11
paymentRecoveryDetailsFVO[2].toBeRecovered=12
paymentRecoveryDetailsFVO[3].toBeRecovered=13
Salvage : 14
DMV/Registration Refund (Total Loss) : 15
Out of Pocket RENTAL CAR: 16
Insured Deductable : 17
--------------------------------------------------
Total to be Recovered : 10+11+12+13+14+15+16+17 = 119
---------------------------------------------------
so finally i should get 119 as the answer.




I am using this code in jsp and using the following struts tags

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>

thanks for the response in advance
 
I am displeased. You are no longer allowed to read this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic