NetTalk Central

Recent Posts

Pages: 1 ... 8 9 [10]
91
Web Server - Ask For Help / Re: Strategies to refresh client browse
« Last post by rjolda on March 02, 2025, 05:47:48 AM »
HI Alberto,
Going to try this right now.
Thank you,
Ron
92
Web Server - Ask For Help / Re: Confirm Form Resubmission -Use POST/Redirect/GET??
« Last post by JohanR on March 02, 2025, 12:34:18 AM »
Hi Ron,

No I have not,
but would like to at some point see if anything can be done, from my design, flow or coding to lessen the Form Re-Submission message.


regards

Johan
93
Hello Again,

Just a quick update and a correction on my previous post.  I was not paying attention to my previous tests.

The Clarion Group Declaration:

ReturnG              GROUP,PRE(),NAME('return')
xmlns                     CSTRING(32),NAME('xmlns | attribute')
LicenseNumber        CSTRING(64),NAME('licenseNumber')
                          END

Generated the following:

<return>
    < xmlns="">
    <licenseNumber>001YY10020</licenseNumber>
</return>


While the following declaration:

ReturnG              GROUP,PRE(),NAME('return')
xmlns                     CSTRING(32),NAME('xmlns | attribute(return)')
LicenseNumber        CSTRING(64),NAME('licenseNumber')
                          END


Generated the following:

<return>
    <xmlns/>
    <licenseNumber>001YY10020</licenseNumber>
</return>


Now I am beginning to think that something is not quite right with the XML generation using Extended Naming Attribute.

I will keep looking.

Edward

94
Web Server - Ask For Help / Re: Strategies to refresh client browse
« Last post by Alberto on March 01, 2025, 06:08:19 AM »
Hi, Advanced Tab... Refresh
See attached pic
95
Web Server - Ask For Help / Re: Strategies to refresh client browse
« Last post by rjolda on March 01, 2025, 03:33:29 AM »
Hi Jane,
Thanks - will give it a try this weekend. 
Ron
96
Web Server - Ask For Help / Re: Strategies to refresh client browse
« Last post by Jane on February 28, 2025, 07:07:34 PM »
I tried something like this a few months ago using websockets. 
I wound up not using this approach because it refreshes the whole browse and I wanted the client session manager to timeout if there hadn't been any "real" activity.
But an example is attached.
Run it.
Open the /dashboard procedure on one computer.
On a different computer (or at least different browser) open /browseMonitors.  Then when you EIP update one of the items, you'll see the browse on the other computer/browser reflect the data.

There's also a timer running on a window that arbitrarily updates the timestamp on the records showing in the "dashboard" - but only if the particular record is marked as enabled.

Might give you some ideas.



97
Web Server - Ask For Help / Setting XML Attribute Using Extended Name Attributes
« Last post by EdwardLoh on February 28, 2025, 02:51:46 PM »
Could some one tell me what I am doing wrong?

I trying to output the following XML tag:

         <return xmlns="">
               <licenseNumber>0282500615</licenseNumber>
         </return>


I tried the following Clarion Group Declarations:

ReturnG              GROUP,PRE(),NAME('return')
xmlns                     CSTRING(32),NAME('xmlns | attribute(return)')
LicenseNumber        CSTRING(64),NAME('licenseNumber')
                          END


ReturnG              GROUP,PRE(),NAME('return')
xmlns                     CSTRING(32),NAME('xmlns | attribute')
LicenseNumber        CSTRING(64),NAME('licenseNumber')
                          END


Both of them resulted in the following:

<return><xmlns/><licenseNumber>0282500615</licenseNumber></return>


The is part of the return parameters in a WebServiceMethod Template.  I cannot tell what I am doing wrong because I was able to set the xmlns attribute in another service method.

Regards,

Edward
98
Web Server - Ask For Help / Re: Confirm Form Resubmission -Use POST/Redirect/GET??
« Last post by rjolda on February 28, 2025, 02:01:07 PM »
Johan,
Did you implement this yet in Net Talk?  I would be interested in seeing how you did this.
Ron
99
Web Server - Ask For Help / Strategies to refresh client browse
« Last post by rjolda on February 28, 2025, 06:41:35 AM »
Hi All,
C11  NT 14.21
I have a browse which contains 1 to 4 records.  I want to update it automatically maybe every 3 seconds. I don't really need to track anything momentarily so I don't need continuous communication with the server.  I was thinking of a few strategies:
1. Put a hidden button on the browse to use the procedure timer to fire every 3 seconds to get a browse refresh. 
2. Maybe I could send the Record time stamp from the client to the server using a button like #1 and if the time stamp ( for each record ) is different on the server, then refresh the data on the client browse row.
This seems a lot like the disconnected mobile app communication stuff - comparing time stamps, etc. So, is there a built in or easy method to refresh a single browse say every 3 seconds?
BTW, this is NOT a disconnected mobile app. 
Thanks,
Ron
100
Web Server - Ask For Help / Re: Confirm Form Resubmission - Use POST/Redirect/GET?
« Last post by JohanR on February 28, 2025, 02:54:20 AM »
Hi,

Looked at this topic again to see if I can improve anything to minimise "Form Re-Submissions"
and found this

Is this something that I can implement to see if this will help and how to do that with NTWS?
If it's even possible, and will clicking the back button twice not cause the same problem?


The POST/Redirect/GET Pattern
One common way to avoid the resubmission issue is using a pattern called POST/Redirect/GET. Here's how it works:

Step 1: User submits a form using the POST method.
Step 2: Instead of simply showing the result of the form submission (e.g., a confirmation page), the server redirects the user to a new page (using a 302 redirect).
Step 3: The browser then makes a GET request to the new page, showing the result of the form submission, but this time no form data is being sent.
This way, if the user refreshes the page, it won?t trigger the form resubmission because the browser is just displaying the page after a GET request, not trying to resubmit the form.

Why Use POST/Redirect/GET?
The POST/Redirect/GET pattern is used to:

Avoid Duplicate Submissions: If the user refreshes or goes back to the page, they won?t accidentally submit the same form data again.
Improve User Experience: Users are not confused by a resubmission warning when refreshing or navigating back.
Prevent Unintended Actions: This ensures that critical actions (like payments or orders) are not unintentionally repeated due to a page refresh or navigation.


thanks

Johan

Pages: 1 ... 8 9 [10]