NetTalk Central

Author Topic: Option to use submit type buttons for browse update buttons.  (Read 3691 times)

Rob Kolanko

  • Sr. Member
  • ****
  • Posts: 253
    • View Profile
Option to use submit type buttons for browse update buttons.
« on: December 16, 2013, 12:56:28 PM »
Hi Bruce,
Would it be difficult to add an option on the NetWebBrowse to use "submit" type buttons for the browse update buttons (.e.g. Insert, Change, etc)? There are times that I wish to add a browse to a form that has text fields. If the user enters a lot of text into the text field, then presses the Insert or Change button on the browse, the user’s entered text is lost.  This is because there is no request for the browser to send a Post with the form’s text areas to the server. If submit document was done with the browse update buttons, I could get the user’s new text from the value queue in the form of the browse table.  I would need the submit button for both the large and small update buttons on the browse. Also I do not wish to make the forms for the browse a pop-up.

I think this request is straight forward, however if you would like an example, I should be able to prepare one.

Thanks Rob
« Last Edit: December 16, 2013, 01:00:07 PM by Rob Kolanko »

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11247
    • View Profile
Re: Option to use submit type buttons for browse update buttons.
« Reply #1 on: December 17, 2013, 12:50:50 AM »
Hi Rob,

>> Would it be difficult to add an option on the NetWebBrowse to use "submit" type buttons for the browse update buttons (.e.g. Insert, Change, etc)?

Changing the button type from "Button" to "Submit" is do-able, but will have a lot of knock on effects. Plus, browses no longer have a <form> of their own, so it would basically break the buttons for many common situations. So I think maybe that's not the correct solution to the actual problem at hand. Let's back up a bit;

>> There are times that I wish to add a browse to a form that has text fields. If the user enters a lot of text into the text field, then presses the Insert or Change button on the browse, the user’s entered text is lost.

I think an example would be a good idea. I tried tweaking the Books example to show the effect, but failed. I think maybe it hs to do with the way you've setup pages vs popups etc?

Cheers
Bruce


Rob Kolanko

  • Sr. Member
  • ****
  • Posts: 253
    • View Profile
Re: Option to use submit type buttons for browse update buttons.
« Reply #2 on: December 17, 2013, 08:25:08 AM »
An example will work only under certain conditions and with certain browsers, Firefox being one of them, IE never seem to loose text. I found that the problem only occurred when there is a wide area (internet) connection between the browser and the server and there is a lot of text in text areas on the form.  The symptoms are that after the user closes the form from the browse, the text field looses any of the entered text prior to the pressing the browse update button. My form has a session variable that prevents the reloading of the table’s session variables when the form is regenerated. I fixed this same loosing text issue where this form went to another form by changing the calling button to a submit button and storing the test areas in the fields session variables in the new form. Since I have made this change,  I cannot reproduce the same issue with the browse update buttons that was loosing text before the change. Even before  I made the changes, I never had text loss when hosting the program on my computer or on a server on a LAN. I would be happier to know that I am storing the text fields when going to different forms. Thus I made the request if it would be easy to add an option to use a submit form button.  Sorry I do not wish to waste your time if there is not problem here, but I need to feel confident that my customers will not loose their input.

My understanding is that data gets from the browser to the server via two methods, get and post which are shown on the NetTalk server log.  By following the log when the browse button is pushed, I do not see the form data being sent to the server. Thus is  the browser is buffering the form data? in case the form is requested again. What am I missing here?

Thanks,
Rob
« Last Edit: December 17, 2013, 08:58:20 AM by Rob Kolanko »

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11247
    • View Profile
Re: Option to use submit type buttons for browse update buttons.
« Reply #3 on: December 17, 2013, 10:11:22 PM »
Hi Rob,

>> An example will work only under certain conditions

I can probably run it under those conditions if necessary.

>> I need to feel confident that my customers will not loose their input.

I agree.

>> My understanding is that data gets from the browser to the server via two methods, get and post which are shown on the NetTalk server log.

correct. When you complete a field (assuming auto-validate is on) the value of the field is sent to the server, and stored in the session value. One of the first things to make sure of is that this packet is indeed being sent (and the value correctly stored in the session variable.)

Obviously if the session variable is then later cleared, or re-loaded from the disk or whatever then that will have an effect.

Another thought - is the large text field a STRING or MEMO?

the Post occurs when the Save button (or Cancel button etc) is pressed. This sends all the fields to the server.

>> Thus is  the browser is buffering the form data? in case the form is requested again.

no, I don't think so - although you might have a browser extension that does that.

More likely is that the session value on the server side is being cleared somewhere. But it's hard to be more specific without being able to duplicate the effect.

Cheers
Bruce

Rob Kolanko

  • Sr. Member
  • ****
  • Posts: 253
    • View Profile
Re: Option to use submit type buttons for browse update buttons.
« Reply #4 on: December 18, 2013, 10:33:13 AM »
>> is the large text field a STRING or MEMO?
up to 5 memo fields, all are readonly except for one. However I need the scroll bars on the fields, because they contain a lot of text.

Ever since I modified the form  to change an unrelated button to submit, the changed memo text has been retained after pressing the browse update button to display another form then return to the form with the memo text . Whereas before the text was lost with Firefox/ Safari when accessing the server through the internet. But, it is working now. I have discovered that once the text field is changed, the text is being sent via a GET submission, when the user selects another tab or button on the form (I missed this before as I cleared the log just before the browse button was pushed).  I made an example program by modifying WEB1 example’s mailbox form with a browse to the alias table. I changed the AutoResponseText field of the MailBoxes table to a 20,000 character memo field. I then ran this program on a server and via my NetLimiter tool, I was able to slow the network to 60kbit/s for Firefox. As I suspected, the GET transmission with a large amount of text was arriving at the server well after the request for Alias web page form. Nevertheless the transmission was processed and the session variable was updated even though the Alias web page was on showing on the browser at the time. Since I cannot repeat the problem, this issue is done.

Rob


[attachment deleted by admin]

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11247
    • View Profile
Re: Option to use submit type buttons for browse update buttons.
« Reply #5 on: December 18, 2013, 10:15:29 PM »
<< Since I cannot repeat the problem, this issue is done.

noted.