Results 1 to 3 of 3

Thread: using a RO field in validation

  1. #1
    ron schechtman Guest

    using a RO field in validation

    I have a form which contains a date reported field and is read only. The form also has a date completed field which the user fills out. I do not want the date reported field to be touched by the user, yet I also want to make sure the date completed value entered is not less than the date reported field. When the validation javascript references the date reported field, I get an error that the field is not an object. The only way to get this to compare is to not have the date reported field as read only. How can I have the validation javascript reference the read only field on the form?

    Thanks.

  2. #2
    John Guest

    using a RO field in validation (reply)


    Hi Ron,

    What you&#39;re after isn&#39;t as easy as it sounds. The problem is that when we make a field &#34;Read Only&#34; all that happens is that in HTML instead of doing an <INPUT> tag, we simply output the data between the <TD></TD> tags. In other words, the field becomes nothing more than simple &#34;text&#34; on the page.

    You can&#39;t check that text in your validation routine because it&#39;s not really a field.

    One solution I can think of is to Export the field with dbExportFlds and then use that exported value in your comparison in your validation routine.

    That might just do it.

    Thanks,
    John

    ------------
    ron schechtman at 9/26/01 6:53:55 PM

    I have a form which contains a date reported field and is read only. The form also has a date completed field which the user fills out. I do not want the date reported field to be touched by the user, yet I also want to make sure the date completed value entered is not less than the date reported field. When the validation javascript references the date reported field, I get an error that the field is not an object. The only way to get this to compare is to not have the date reported field as read only. How can I have the validation javascript reference the read only field on the form?

    Thanks.

  3. #3
    ron schechtman Guest

    using a RO field in validation (reply)

    Thanks John. But, how would I do this in a javascript and where would I actually do the export in the aspdb script. I first display a grid and then the user presses the update button. Is it possible to have a RO field and a hidden field for the same field. I tried to use the edthideflds (not sure if that is right), but the field still shows up on the form.


    ------------
    John at 9/27/01 12:03:59 PM


    Hi Ron,

    What you&#39;re after isn&#39;t as easy as it sounds. The problem is that when we make a field &#34;Read Only&#34; all that happens is that in HTML instead of doing an <INPUT> tag, we simply output the data between the <TD></TD> tags. In other words, the field becomes nothing more than simple &#34;text&#34; on the page.

    You can&#39;t check that text in your validation routine because it&#39;s not really a field.

    One solution I can think of is to Export the field with dbExportFlds and then use that exported value in your comparison in your validation routine.

    That might just do it.

    Thanks,
    John

    ------------
    ron schechtman at 9/26/01 6:53:55 PM

    I have a form which contains a date reported field and is read only. The form also has a date completed field which the user fills out. I do not want the date reported field to be touched by the user, yet I also want to make sure the date completed value entered is not less than the date reported field. When the validation javascript references the date reported field, I get an error that the field is not an object. The only way to get this to compare is to not have the date reported field as read only. How can I have the validation javascript reference the read only field on the form?

    Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •