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 - Jane

Pages: 1 ... 3 4 [5] 6 7 ... 23
61
Web Server - Ask For Help / Re: Load balancing
« on: December 20, 2022, 10:43:51 AM »
It does not address sessions. 


So how do you deal with that, Don?

Does Nginx just always direct session xyz to the same instance that session used for the previous call(s) ?

Cheers,

Jane

62
Web Server - Ask For Help / Re: Load balancing
« on: December 19, 2022, 12:02:36 PM »
but how would it be done with one of the existing tools? do you have example, documentation or webminar?
Gordon Holfelder did a webinar on this for the CIDC 2019 conference, which is still online if you purchased that conference:
https://www.cidc2019.com/Presentations#LoadBalancingaWebserverAcrossMultipleInstances

As I recall, one of his challenges was sharing session values across multiple web servers. 

The Net Sessions interface that Bruce introduced in NT 12 should make sharing session values easier.

63
Web Server - Ask For Help / Re: My tip broke my menu
« on: December 07, 2022, 05:39:42 PM »
Thanks!

65
Web Server - Ask For Help / My tip broke my menu
« on: December 06, 2022, 06:21:33 PM »
Bruce,

On a drop-down menu I put the following as a tool-tip:
Code: [Select]
'View items that need to be configured at the command-line or in the web server app window.'
Seemed innocuous, but it wound up breaking the entire menu.

Took a bit of head scratching to discover that the tip gets concatenated with the button class and it all has to fit into 256 characters.

Would you considering making those strings larger?

Thanks,

Jane

66
Web Server - Ask For Help / Re: Secwin 7.40 compiling error
« on: December 06, 2022, 11:59:33 AM »
Compiles on my machine.  What version of MyTable  are you using?


67
Web Server - Ask For Help / Re: Wizard type Tab style does not work.
« on: December 05, 2022, 09:00:01 AM »
WOMM with 12.50.

Maybe use the Themer example to see what settings you may be missing.


68
Try this in PageReceived after the parent call and see if it's useful:

Code: [Select]
   self.trace('pageReceived response = ' & self.ServerResponse)

69
Web Server - Ask For Help / Re: jFiles : "pretty" JSON?
« on: October 24, 2022, 01:42:38 PM »
Maybe play with the format parameter on the Save method?  https://www.capesoft.com/docs/jfiles2/jfiles.htm#Save

70
Web Server - Ask For Help / Re: Script defer
« on: October 24, 2022, 01:37:58 PM »
>> could these not be set as deferred as well?

Not really.  As the doc I quoted says (emphasis added)
inline scripts without the type="module" attribute, are fetched and executed immediately

The bits I would need to defer I'm actually building up in a StringTheory object with <script> tags and the various parameters built in to the string.  Then sent with packet.Append.

Apparently those are considered "inline" scripts and cannot be deferred.

So I'd have to rewrite them into script files.  And doing javascript functions with $(document).ready that have parameters is a bit above my skill level.  Perhaps an exercise for the student some rainy Saturday.  (Although unfortunately we only get rain for about 12 minutes per year  ::)  )

Simplest for me was just to write a little Clarion code that mimics p_web.AddScript without the DEFER and to call that when I need to.

Apparently this is only an issue for me and nobody else has reported a problem with $(document).ready getting called too early with an inline script.  And I've got a workaround now.

Cheers,

Jane


71
Web Server - Ask For Help / Script defer
« on: October 23, 2022, 04:08:46 PM »
Bruce,

I ran into a minor head-scratcher updating an app from 11.47 to 12.47.

This is a "hybrid" app. 
Much of it is pure NetTalk.  But for reasons of imposed aesthetic choices, it has a section that displays pages formatted with Bootstrap.  (They are patient status display pages on large monitors on the wall in various clinics.  The status is updated every 15 seconds.   A URL parameter hard-coded into the dedicated ChromeBox at each site tells the server which site's patients to display.)  This was originally built in NT 10 and has been on NT 11 for the past couple of years.

Those pages are a NetWebPage "shell" that contains a framework of scripts and CSS and a named division.
One script is on a timer to update that named division by making a call to another NetWebPage every 15 seconds.
The scripts in the "shell" page are jquery and bootstrap (from the /scripts folder) and several scripts hard-coded in the NetWebPage.  The latter are in the page rather than in a file because they include variables based on the URL sent to the page.

Then kaboom when I rebuilt with 12.47.
The reason turns out to be that you've added "defer" to NetWebServerWorkerBase.AddScript

That "defer" in the jquery loading then caused my locally-built scripts to throw an error - Uncaught ReferenceError: $ is not defined

What do you mean it isn't defined?? I just defined it!!!  (Well, yeah.)

Anyway, now that I'm aware of the issue I've fixed my code in that one NetWebPage and all is well.

But I was wondering whether there would be any value in having an optional parameter to override that "defer" in NetWebServerWorkerBase.AddScript (or an overload version)?

Interestingly, looking at the NT history it says "Add: DEFER attribute added to all <script> sections. " for version 4.31(beta)
And then again "Add: defer attribute to script files" for 12.09.

BTW - you generate
Code: [Select]
defer="defer"
The Mozilla docs say defer is Boolean.  https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script#attr-defer

My own experiment finds that just the presence of the single word defer triggers the behavior. 

As that Mozilla link says,
Quote
inline scripts without the type="module" attribute, are fetched and executed immediately,
  So I need to un-defer the jquery rather than defer my inline scripts.

And that's how I spent my Sunday ;)

Cheers,

Jane

72
Web Server - Ask For Help / Re: IT Audit Report
« on: October 21, 2022, 07:35:57 AM »
My NT 12.47 apps report 3.6.0 
console.log(jQuery().jquery);

The History in the docs says that update to 3.6.0 was as of 12.33 last December.

As Bruce often says, security is not a "one and done" affair.  I'd suggest upgrading.

Cheers,

Jane

73
Sean,

Not sure whether I understand your situation.

But I've had cases (not barcode, just regular lookups) where I needed a two-part lookup key (i.e., practice ID and provider ID). 

I've found I needed a single-component key to make this work.

Since I'm using SQL, in my case it's easy to create a computed column
CAST(p.contextId AS VARCHAR(6))+'|'+CAST(p.providerId AS VARCHAR) AS ID

Then I put a key on that in the Clarion dictionary and it works fine.  Simple to write a function that splits that ID into its two constituent pieces when needed.

JAT...

Jane

74
Web Server - Ask For Help / Re: What is more?
« on: October 19, 2022, 09:02:53 AM »
Thanks for the confirmation, Don.

@Bruce - not important.  I'm just using StringTheory's abbreviate on the fields now.  Might be better, though, to remove the template option if it doesn't work?

Cheers,

Jane

75
Web Server - Ask For Help / What is more?
« on: October 17, 2022, 07:33:38 PM »
Hi, Bruce.

In a browse, for a string field there's an option on the Column tab called "Abbreviate Length".

It adds "more" as a hyperlink.  In the template-generated code, what's generated when I specify a picture of @s70 and an "abbreviate length" of 50 is:

Code: [Select]
packet.append( p_web.CreateHyperLink(p_web._jsok(Left(p_web.FormatValue(aud:notes,'@s70')),(Net:HtmlOk*0)+(Net:UnsafeHtmlOk*0)),,,,loc:javascript,,,(Net:HtmlOk*0)+(Net:UnsafeHtmlOk*0),,,'editAuditDatesBrowse',loc:abbreviate,'more'))

where editAuditDatesBrowse is the name of the browse procedure.

I haven't managed to find anything in the docs.  There is a mention in the May 3, 2018 user group webinar.  But when you ran an example for Don it didn't seem to work.

Does this actually work?  What is it supposed to do when one clicks the link?  If I'm reading netweb.clw correctly, it looks as if the second parameter should be the URL??

Thanks.

Jane


Pages: 1 ... 3 4 [5] 6 7 ... 23