|
Given that the second parm on the popUpCalendar is to be the id for the target field, what if you put something like the following in the "insert HTML after" WebSetting ? <input type=button onclick='popUpCalendar(this, %{HDR01.TESTDS),"dd/mm/yyyy")' value='select'> Alternatively, in the "I have not tired this but I hear it works" category.. <input type=button onclick='popUpCalendar(this, (this.id)-1,"dd/mm/yyyy")' value='select'> Where "this.id" is the id of the current thing, going back by one seems to be the id of the field before. I prefer the absolute ref to the field though. Mike Mike Hockings, P.Eng. WebSphere Development Tools for AS/400 - CODE/Designer & WebFacing ! IBM Canada Ltd. Laboratory hockings@xxxxxxxxxx voice 905 413 3199 Niall Mcloughlin <niallsemail@xxxxxxxxx> Sent by: wdsci-l-bounces@xxxxxxxxxxxx 2004-03-17 20:11 Please respond to Websphere Development Studio Client for iSeries To wdsci-l@xxxxxxxxxxxx cc Subject [WDSCI-L] Re : generated jsp fieldnames Morning Mike Thanks for the pointers. I'm using web settings to insert the javascript, but still getting no joy. I've included a partial section of the jsp to illustrate what I'm trying to do. I'd appreciate any further help you can give me. This snippet is the field definition. The id attribute is what I'm using to try and populate the field with a value derived from the popUpCalendar function. The second parameter of popUpCalendar should be the id of the fieldname to populate. If I insert 'this' as the fieldname parameter, the function correctly returns the selected date to the input button defined, so the function works. If I can derive the id of the fieldname in the jsp, it should populate that. I hope I've explained that clearly. <TD NOWRAP colspan=8 rowspan=1><INPUT <% if (isProtected) { %> readonly tabindex=-1 <% } %> id="l<%=zOrder%>_HDR01$TESTDS" previousValue="<%=HDR01.getFieldValueWithTransform("TESTDS", QUOTED_TRANSFORM)%>" class="<%=isProtected?"wf_pr":""%> wf_default wf_field" VALUE="<%=HDR01.getFieldValueWithTransform("TESTDS", QUOTED_TRANSFORM)%>" SIZE=8 MAXLENGTH=8 ><input type=button onclick='popUpCalendar(this, HDR01.TESTDS,"dd/mm/yyyy")' value='select'></TD><% lastCol=21; %> Regards Niall --------------------------------- Find local movie times and trailers on Yahoo! Movies. _______________________________________________ This is the Websphere Development Studio Client for iSeries (WDSCI-L) mailing list To post a message email: WDSCI-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/wdsci-l or email: WDSCI-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/wdsci-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.