This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Apr 20, 2011, 7:59 PM
31 Posts

Re: Cannot Get Field Value From Inside Function

  • Category: Dojo and Client Side JavaScript
  • Platform: Windows
  • Release: 8.5.2
  • Role: Developer
  • Tags: client side JavaScript
  • Replies: 4
To follow along your path, have you tried:
XSP.getElementById("#{id:computedField2}").innerHTML;  ?
Apr 20, 2011, 8:13 PM
10 Posts
Re: Cannot Get Field Value From Inside Function - GOT IT!!!
Yup, and I get the same results.  I have absolutely no idea why I couldn't use any of those configurations.
 
However, the good news is that with just a bit of tweaking, I was able to use the dojo.query to obtain the field value.  You use

var employer = dojo.query('[id$=\":EmployerID\"]')[0];
alert("employer:  " + employer.innerHTML);
 
I had used compositeData to bring the value of EmployerID from the custom control it was in, to the computedField2 on the current custom control.  However, with the above, I can directly access the data from the other custom control without using compositeData.  I had thought that was initially part of my problem - that the code couldn't 'see' the field because it was on another custom control and I understood that they can't see inside of each other.

Ya gotta love it when stuff works and in a more simple way than you were trying to do it!
 
Thanks so much for your help with this.  I do appreciate the suggestions.

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal