Maybe you don't need the hidden field. How do you come up with its value
in the first instance, before you paint the page for the first time in a
session? Could you calc the value on the fly in the page-level
onBeforeHtmlOutput event and stick it in an instance variable? If you
could recalc the correct value each time, you wouldn't need to send it out
in the hidden and get it back.
In general, you should be careful about using getValue on fields on the way
out the door. I try to restrict it to values that I am getting back from
the page, precisely because of timing issues such as you seem to be
encountering.
-- Curt Springer, Team ND
At 01:26 PM 1/19/00 -0800, Tony Yan wrote:
>Sorry, I didn't describe my problem clearly.
>
>I put a repeat consisting of two static text fields and a hidden field,
>all of them bound
>to the data fields of the same data object in the right frame. You are
>right. I did put my
>logic in the onBeforeHtmlOutputEvent of one of the static texts. In my
>logic, I first used
>the getValue() on the hidden field to get the value of the hidden field,
>and then used
>setHtmlText() to change the color of that static text message according to
>the value
>returned by the hidden field. In the HTML editor, I moved the hidden
>field before the
>static fields. I thought at the point the value of the static text field
>was available, I
>should also be able to use the getValue() to get the value of the hidden
>field.
>
>Your comment makes a lot of sense. Could you please make any further
>explanation
>on my case? Hope my description is clear and understandable.
>
>Thanks very much
>
>Tony
>
>
>
>Curt Springer <[EMAIL PROTECTED]> wrote:
> >I always hesitate to reply when frames are involved.
> >
> >Something is out of phase here.
> >
> >If you are executing getValue() successfully on a static text field, this
> >means that you are doing it _before_ the page is displayed. This is
> >because static text values are not returned when a page is displayed and
> >then called back to via a button or href.
> >
> >If you are getting null when executing getValue() on the hidden field, it
> >would be because the value has not yet been assigned to the hidden field at
> >the point you are trying to get it. When you do 'view source' and see the
> >value, that is because the hidden field was assigned a value after the
> >point that you executed 'getValue()' on it, and then the value was included
> >in the HTML when the page was sent to the browser.
> >
> >-- Curt Springer, Team ND
> >
> >At 06:28 AM 1/19/00 -0800, Tony Yan wrote:
> >
> >>I have a frameset with three frames. The top frame is the main menu,
> >>consisting of
> >>several buttons. The left frame displays a Href list responding to the
> >>button that the
> >>users click, and the right one displays the detail information of an entry
> >>in the left frame
> >>when the users click the Href. There are several static text fields and a
> >>hidden field in
> >>the right frame, all of them bound to the data fields of the same data
> >>object. Based on
> >>the value of the hidden field, I will show those static text messages in
> >>different colors.
> >>I used the getValue() for all the static text fields and hidden fields. I
> >>can get the correct
> >>text values for the static text fields, but always get null for the hidden
> >>field. When I
> >>viewed the right frame source, I can see the hidden value right there.
> >>
> >>Any suggestion will be highly appreciated.
> >>
> >>
> >>Tony
> >>
> >>_________________________________________________________________________
> >>
> >>For help in using, subscribing, and unsubscribing to the discussion
> >>forums, please go to: http://www.netdynamics.com/support/visitdevfor.html
> >>
> >>For dire need help, email: [EMAIL PROTECTED]
> >
>
>_________________________________________________________________________
>
>For help in using, subscribing, and unsubscribing to the discussion
>forums, please go to: http://www.netdynamics.com/support/visitdevfor.html
>
>For dire need help, email: [EMAIL PROTECTED]
_________________________________________________________________________
For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html
For dire need help, email: [EMAIL PROTECTED]