Results 1 to 4 of 4

Thread: Add equivalent of EditValidateName?

  1. #1
    Bryan Hardy Guest

    Add equivalent of EditValidateName?

    In going through my add/update templates again, I have some fields that need validation. For my updates, I can successfully add the EditValidateName=editvalidate() parameter to the .dbEditParams, and the update template calls the javascript editvalidate() function and everything works.
    It doesn't seem that the add template makes a call to the editvalidate() function. Is there an equivalent parameter for add validation? I didn't see one mentioned in the docs, but I might have been overlooking it. Or should it be calling the same function? (In which case, I wonder what I'm doing wrong...)
    Thanks!
    Bryan

  2. #2
    Frank Kwong Guest

    Add equivalent of EditValidateName? (reply)

    You can try to Magic the field to use validate before mask it to the template. Ther is not direct EditValidate in template. The reason is that we have integrated the validate into the entire edit scheme in ASPdb.Net. No plans to do it in ASP-db at this time.

    FK


    ------------
    Bryan Hardy at 1/17/2002 2:32:03 PM

    In going through my add/update templates again, I have some fields that need validation. For my updates, I can successfully add the EditValidateName=editvalidate() parameter to the .dbEditParams, and the update template calls the javascript editvalidate() function and everything works.
    It doesn't seem that the add template makes a call to the editvalidate() function. Is there an equivalent parameter for add validation? I didn't see one mentioned in the docs, but I might have been overlooking it. Or should it be calling the same function? (In which case, I wonder what I'm doing wrong...)
    Thanks!
    Bryan

  3. #3
    Bryan Hardy Guest

    Add equivalent of EditValidateName? (reply)

    Frank, thanks for the idea!

    But maybe I didn't explain what I was trying to do properly...

    I'm using EditValidateName=EditValidate() sucessfully right now for validation that is triggered when the Submit button is pressed on the template. It works perfectly for the update template. The submit button is pressed, the editvalidate() javascript function fires, it validates the values on the page, etc. But the same process on the add template does not occur. The user fills out the new record, presses submit, and the code does not call the editvalidate() javascript function but continues on to generate oracle errors. My questions was whether an Add should call the editvalidate() javascript function, or whether there was another parameter to set like AddValidateName=addvalidate() or some such that would point to a function that the add would call.

    In other words, taking templates out of the picture, should an add new call the editvalidate() function just as an update does? If so, I'm confused as to why the add template would not when the update template does. If not, what would you do in a normal ASP-db page for validation on an add record, besides using the validatorparams?
    Bryan

    ------------
    Frank Kwong at 1/17/2002 9:52:11 PM

    You can try to Magic the field to use validate before mask it to the template. Ther is not direct EditValidate in template. The reason is that we have integrated the validate into the entire edit scheme in ASPdb.Net. No plans to do it in ASP-db at this time.

    FK


    ------------
    Bryan Hardy at 1/17/2002 2:32:03 PM

    In going through my add/update templates again, I have some fields that need validation. For my updates, I can successfully add the EditValidateName=editvalidate() parameter to the .dbEditParams, and the update template calls the javascript editvalidate() function and everything works.
    It doesn't seem that the add template makes a call to the editvalidate() function. Is there an equivalent parameter for add validation? I didn't see one mentioned in the docs, but I might have been overlooking it. Or should it be calling the same function? (In which case, I wonder what I'm doing wrong...)
    Thanks!
    Bryan

  4. #4
    Bryan Hardy Guest

    Add equivalent of EditValidateName? (reply)

    Well, I made myself a workaround for this.
    I insert a new record into the database, redirect to another ASP-db page where the SQL is set to select the newly inserted record, set the mode to editupdate, and use the update template. I then have the validation I have working on an update.
    Pressing the update record redirects to the original page, and pressing cancel deletes the newly inserted record and redirects to the original page.
    It's not perfect, but it gets the job done without using the add template.
    Thanks!
    Bryan


    ------------
    Bryan Hardy at 1/18/2002 9:16:24 AM

    Frank, thanks for the idea!

    But maybe I didn't explain what I was trying to do properly...

    I'm using EditValidateName=EditValidate() sucessfully right now for validation that is triggered when the Submit button is pressed on the template. It works perfectly for the update template. The submit button is pressed, the editvalidate() javascript function fires, it validates the values on the page, etc. But the same process on the add template does not occur. The user fills out the new record, presses submit, and the code does not call the editvalidate() javascript function but continues on to generate oracle errors. My questions was whether an Add should call the editvalidate() javascript function, or whether there was another parameter to set like AddValidateName=addvalidate() or some such that would point to a function that the add would call.

    In other words, taking templates out of the picture, should an add new call the editvalidate() function just as an update does? If so, I'm confused as to why the add template would not when the update template does. If not, what would you do in a normal ASP-db page for validation on an add record, besides using the validatorparams?
    Bryan

    ------------
    Frank Kwong at 1/17/2002 9:52:11 PM

    You can try to Magic the field to use validate before mask it to the template. Ther is not direct EditValidate in template. The reason is that we have integrated the validate into the entire edit scheme in ASPdb.Net. No plans to do it in ASP-db at this time.

    FK


    ------------
    Bryan Hardy at 1/17/2002 2:32:03 PM

    In going through my add/update templates again, I have some fields that need validation. For my updates, I can successfully add the EditValidateName=editvalidate() parameter to the .dbEditParams, and the update template calls the javascript editvalidate() function and everything works.
    It doesn't seem that the add template makes a call to the editvalidate() function. Is there an equivalent parameter for add validation? I didn't see one mentioned in the docs, but I might have been overlooking it. Or should it be calling the same function? (In which case, I wonder what I'm doing wrong...)
    Thanks!
    Bryan

Posting Permissions

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