NetTalk Central

Author Topic: NT5 - Form Not Validating on Second and Subsequent Submissions  (Read 3742 times)

Rob Mikkelsen

  • Full Member
  • ***
  • Posts: 107
    • Yahoo Instant Messenger - flashpott
    • View Profile
    • Email
NT5 - Form Not Validating on Second and Subsequent Submissions
« on: November 17, 2010, 09:02:17 PM »
I am converting an app from NT4 to NT5 but have encountered an issue that I cannot seem to overcome.  On a page I have two iframes - one to create search criteria using a NetWebForm and the other to display the results.  This allows the query to be changed and resubmitted.  In NT4 when the "save" button was pressed, the form was validated and the results iframe was updated.  In NT5, the form is only validated the first time the "save" button is pressed, but the results are updated with the old search criteria regardless of what is entered in the form.

How do I restore the previous behavior of the form where it is validated and fields updated on every submission?

Rob

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: NT5 - Form Not Validating on Second and Subsequent Submissions
« Reply #1 on: November 18, 2010, 02:46:12 AM »
Hi Rob,

Two questions;
a) why the need for iFrames? I don't think you need iFrames to do a "Advanced search". Check out the DropFilter example, or read the bit in the book about using form fields as a browse filter.

b) why does the form have a "save" button?  You can have a button on the form to "reset" the browse if you like, or just reset it as the values are entered.

cheers
Bruce


Rob Mikkelsen

  • Full Member
  • ***
  • Posts: 107
    • Yahoo Instant Messenger - flashpott
    • View Profile
    • Email
Re: NT5 - Form Not Validating on Second and Subsequent Submissions
« Reply #2 on: November 18, 2010, 05:27:14 AM »
Bruce,

I started using the iframes out of ignorance and, at the time, perceived or actual limited browse functionality.  You can see the current NT4 functionality at

http://www.trailerlocators.com/AdSearchPage .

I obtain an address from the user that is then geocoded and displayed using the google mapping api prior to calling the display function.  The list sorted on a field that is calculated as a distance from the entered address. I suppose it would be trivial to put the returned data into an IMDD table and browse list, I will have to play with that.

Since the data is sorted by a calculated field, it is not something that I want to update dynamically - with 38,000 records to review it would take entirely too long to do asynchronously.  So, I renamed the "save" button to "search" and call the display when the form is submitted.  Under NT4 it worked every time the "search" button was pressed - in NT5 it does not.

While my methodology for deriving the results could certainly be improved, what can I do to live with my less-than-optimal code using the process that previously worked flawlessly in NT4 until I can rework it?

Rob