NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: vklemet on November 07, 2013, 12:56:40 AM

Title: Send new value to server sends to a wrong NetWebForm
Post by: vklemet on November 07, 2013, 12:56:40 AM
Hello,

Currently working with Clarion 8 and NT 6.54, I have a form called "Load lists", which has another form, called "Day limits" and a browse "Loads" as fields in one tab. In the "DayLimits" form I have a checkbox, which has "Send new value to server" selected from the Client-Side tab. This checkbox is used to show/hide fields from the "Day limits" form and change behaviour of the report that can be printed from the form.

The problem is that the checkbox send value to the "Load lists" form instead of the "Day limits" form, so nothing gets done. Is there some setting for deciding which form gets the value?

This project was just upgraded from C6 and NT 5.29, where it worked fine, so I am wondering what has changed?

BR,
Vesa
Title: Re: Send new value to server sends to a wrong NetWebForm
Post by: Bruce on November 07, 2013, 10:14:29 PM
Hi Vesa,

>> I have a form called "Load lists", which has another form, called "Day limits"

hmm. This is not allowed. HTML does allow for a Form inside a Form.
I'm somewhat surprised that it worked at all in 5.29 - but I'm pretty sure it's not ever been officially allowed. I think the reason it was working was more by happy accident than by plan.

Your best bet is to refactor the LoadLists form so it contains the fields it needs, and doesn't link in Day Limits.

cheers
Bruce
Title: Re: Send new value to server sends to a wrong NetWebForm
Post by: vklemet on November 08, 2013, 02:21:26 AM
Hi Bruce and thanks for the answer!

Okay, just to make sure, there cannot be a NetWebForm inside a NetWebForm? 

The difference I see with the NT versions is that when I click the checkbox, the GET-event in the server window goes to different procedure (Load lists vs Day limits) Does the checkbox act as kind of a submit button when "Send new value to server" is selected for the checkbox?

Ok, most likely I need to refactor my code. It is a good thing that this came up first with this project, as it is quite small one.

BR,
Vesa

Title: Re: Send new value to server sends to a wrong NetWebForm
Post by: Bruce on November 10, 2013, 10:26:31 PM
Hi Vesa,

All fields in NetTalk have the ability to send their value immediately to the server as a GET. This isn't like a submit because it only contains the one field value, and the URL is specially arranged so it goes just to that field.

Cheers
Bruce

Title: Re: Send new value to server sends to a wrong NetWebForm
Post by: vklemet on November 10, 2013, 10:47:36 PM
Hi Bruce,

Ok. The GET from checkbox field in "DayLimits" NetWebForm goes to the "Load lists" NetWebForm, that holds the "DayLimits", and that is probably how it should work.

Thanks for your time, I'll start to refactor my project.

BR,
Vesa