You use JavaScript to generate a date at the frontend (browser) and I
suppose you generate some value also

ie.     <SELECT NAME="parDfrom">
        <OPTION VALUE="_some_value_">_some_date_
              :
              :
        </SELECT>

When you submit the form, the label (_some_date_) is not submitted with the
form. Only the value (_some_value_) is submitted. In your case, _some_value_
may be empty which is the value for "None Selected".

Try setting _some_value_ to _some_date_ so that the generated date is
submitted to the backend.

In any case, you should not be able to get the correct label using
getLabel() since it is not submitted with the form.


> -----Original Message-----
> From: wayne [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, September 08, 1999 2:50 AM
> To:   [EMAIL PROTECTED]
> Subject:      [ND] Javascript generated date to DisplayField
> 
> 
> Hi: 
>      I use javascript to generate some date, which I was able to transfer
> to the NetDynamics ListBox(show on screen). But, when I use following code
> to retrieve them
> CSpListBox lstbxFrom = (CSpListBox)getDisplayField("parDfrom");
> Vector vFrom = lstbxFrom.getSelectedList ();
> for (int i = 0; i < vFrom.size(); i++)
>               {
>                       CSpListItem currSelected = (CSpListItem)
> vFrom.elementAt(i);
>                       CSpValue currSelectedValue =
> currSelected.getValue();
>                       String selectedLabel = currSelected.getLabel ();
>                               
>                       CSpLog.send(this, CSpLog.USER_DEBUG, new
> String("BlankPage11. on save_onWebEvent() Vector
> Value:"+currSelectedValue.toString()+"Vector Label:"+selectedLabel));
> 
> The CSpLog show the default None Selected label. Could anyone help.
> Thanks
> _________________________________________________________________________
> 
> 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]

Reply via email to