NetTalk Central

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - rjolda

Pages: [1] 2 3 ... 32
1
Web Server - Ask For Help / Re: Look up button on a Login Form
« on: September 26, 2026, 03:56:32 AM »
Hi Richard,
Might it be a C12 bug?
This seems like something you are going to have to debug.  Maybe trace the browse that you are trying to open.  Does the button actually call the browse and it gets stuck somewhere - maybe files not open or off screen?  If the browse does open and try to run which stage is it stuck at? IF it does not run, then try re-doing the button on the Login form.
Ron

2
Web Server - Ask For Help / Re: How to execute code once on Form Load?
« on: September 26, 2026, 03:48:05 AM »
Hi Johan,
I think that Multi-tabs being checked ON is one of your problems.
From the Net Talk Development Book Version 4:
Ron


Browsers used to be a single window. Then they acquired tabs, and users could open multiple tabs at
one time, even to the same site. This is sort-of like an MDI child window in a desktop application, but
not quite.
This section described multi-tab support, how to turn it on, and what effects it will have on your
application.
Summary
? Turn on the feature in the web server, performance tab
? Note that Login, and Security information exists across all tabs.

How it Works
Users can, and sometimes do, open your web app in multiple tabs in their browser at the same time.
Because all tabs share a Session cookie, the server is unable to tell when a request comes from one tab,
or from some other tab, and hence activities on one tab can influence the "state" of the app in another
tab. This influence is usually unwelcome and can lead to strange behaviors, or in extreme cases data
corruption. 

NetTalk 8 introduced Multi-Tab support which can be enabled in the WebServer procedure, Settings /
Performance Tab.
If this support is on then each tab is given a unique identifier, and requests from that tab include the
identifier. In this way the app can identify which tab is making a request, and hence keep the state in
one tab different to the state in another tab, so setting a session value in one tab will not set that value
in other tabs (See below for how to create cross-tab values). 
The session itself is still shared. The following states are stored in the session itself, and NOT in the
session data queue. Thus if any of the following states change in one tab they will therefore change in all
tabs.
LoggedIn (yes or no) 
The details of who is logged in are usually stored in the SessionData, and that SessionData will not
change. However the overall state (logged in / not logged in) will be consistent across all the tabs. If the


DEVELOPING WEB APPLICATIONS WITH NETTALK

Page | 101

 

user wishes to Login as 2 different users13 at the same time, in different tabs, then they would need to
login on one tab, open a new tab and login again with different credentials. As the programmer, you
should record who is logged in in SessionData and use the SessionData where applicable. Because each
tab has distinct session data the user will effectively be logged in twice. If they logout in any tab they will
be logged out in all tabs.
If you are logging login's and logouts by embedding code in the SetSessionLoggedIn,
ValidateLogin and/or NotifyDeleteSession then you need to be aware that you'll only get
one call to these methods, but in effect multiple logout's may be occurring at this point.

3
Web Server - Ask For Help / Re: Webhooks in Nettalk?
« on: September 25, 2026, 08:42:48 AM »
Hi Ton,
Thanks for explaining - makes a lot of sense and I see your need.
Ron

4
Web Server - Ask For Help / Re: How to execute code once of Form Load?
« on: September 25, 2026, 08:41:04 AM »
HI Johan,
This does NOT sound right.  Your procedure is actually getting called TWICE.  I would look into that as it should be called ONCE but it will loop through and set different stages.  Sounds like you have parallel procedures and they are clashing.  Seems like you need to see why that is happening.  I do the same type of password reset that you are talking about.  It is a Memory Web Form.  It has an ID that it grabs for password reset.
  loc:resetGUID = p_web.GetValue('id')   ! if comes in with a GUID for PW RESET
     
        !    message('Reset id: '   & loc:resetGUID)
  if loc:resetGUID <> ''
        p_web.SSV('loc:resetGUID', loc:resetGUID)  ! keep until done.
        p_web.SSV('tab',1)
  end     

I use another Memory Form to have them enter their E mail for password reset.  I look up the e-mail and if it exists, I send them a reset link.  Probably much like you did.

I would be wanting to chase down why the procedure for password reset is being called twice.

Ron

5
Web Server - Ask For Help / Re: Webhooks in Nettalk?
« on: September 24, 2026, 03:15:12 PM »
HI Ton,
Very interesting article.  Perhaps you might want to share how you use webhooks in NetTalk and why.
Thanks,
Ron

6
Web Server - Ask For Help / Re: How to execute code once of Form Load?
« on: September 24, 2026, 12:48:58 PM »
Hi Johan,
I wanted to capture the last SAVE to File event and run code there.  I put an embed there and traced the stage each time that it ran and I found that p_stage=65536  was the embed point at the very end.  I put code there and it only runs ONCE.  So, I would suggest you place a debug trace on the embed you want and see what stage it runs at and see if you can isolate a stage (by number) that runs only ONCE.
I am not sure that it is best practice but it works ! ( forms can get called many times as the web server services other calls and keeps coming back to the open form for that user)
Ron

7
Web Server - Ask For Help / Re: Index Page has losts its menu
« on: September 24, 2026, 12:36:54 PM »
HI Richard,
I have had the menu go wonky several times.  I use a double drop menu.  Sometimes after editing a menu item, it goes wonky and goes to Task Panel or Accordion and is half missing.  So, I would check that first. 
Ron

8
Web Server - Ask For Help / Re: Show/hide password in login form
« on: September 19, 2026, 07:10:34 AM »
Jane,
That is pretty nifty.  Good example of JS use.  Very helpful for those of us who are slowly getting our toes wet with JS.
Thanks for sharing.
Ron

9
Hi,
I have a PDF file stored in a blob.  Want to display it in a media object.   I tried st.FromBlob('myblob') to load it into a string theory object and then FOr URL of Media Object: st.GetValue().
Did not work.
Better way to do it correctly?
THanks,
Ron

10
Web Server - Ask For Help / Re: How to Hide and UnHide a Radio Option
« on: September 15, 2026, 09:16:41 AM »
Hi,
I have a radio on a MemForm.  I have 7 options: 
Text: p_web.GSV('autoInfo1')  through ....  p_web.GSV('autoInfo7')
For each one I set the Include Conditon:  p_web.GSV('autoInfo1')<> ''   through .... p_web.GSV('autoInfo7')<> ''
So, I read my data and fill in each p.web.SSV('autoInfo1', mydata)   for each one that I need.
It is not a matter of hiding or unhiding - it is a matter of does the data exist - if yes, then the variable has a value.  If not, the variable has no value and thus is not included.
HTH,
Ron

11
Good info.  Thank you.
Ron

12
Hi Johan,
I am a JS newbie. I would love to see how you use JS to move data from returned fields onto the NT page.
I am querying NTSA API and I get back a string with the vehicle information which I parse out.  I assign the returned data to the respective variables:
e.g. p_web.SSV('AutoYear',returnedYear), etc.
then I do a call to the validate:  DO ValidateValue::CAT:VINnumber 
all of the fields get refreshed.
Ron

13
Web Server - Ask For Help / Re: Webhooks in Nettalk?
« on: September 07, 2026, 03:24:40 PM »
Hi,
HMAC is a method in Capesoft Cryptonite. Using it regularly in my NT Web App. I am using it to validate the Text that I place in a QR code when the QR code is created.  When the user displays the QR code to the reader, we calculate the HMAC of the string read from the QR code to make certain it has not been tampered with.  wouldn't be without it!
Ron

14
Hi,
I am using dnssimple.
NT does have a DNS app which connects to DNSsimple account and can edit it.
Ron

15
Johan,
BTW, the procedures are STATELESS - that means that they do not stay open until closed.  The NT code keeps cycling through the procedure and keeps track of the stage it was in when NT engine last went though it.  So, the code keeps cycling through the form until the user closes it with some action.  SO, watch the stage in a trace as your app runs and you will see it cycling through stages.  There is even a check box on forms to write the stage to the trace.
Ron

Pages: [1] 2 3 ... 32