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

Pages: 1 2 [3] 4 5 ... 735
31
Web Server - Ask For Help / Re: expand/contract CSS
« on: March 15, 2024, 11:43:06 PM »
>> "What selector can I use to attach my CSS class to the element I want to attach it to".
>> Does that question make sense to you?

I'm going to take that as a "no"?

The custom CSS would of course be included in your custom.css file. I think you're happy with that.

What you want to know though is how to attach the custom css to the elements in question.
You're getting bogged down because you are considering only one kind of selector - the class name.

In the HTML the class list is set as
class="whatever something whoknows".
And in your CSS you "select" for a class name using a period (.)

So you wrote your CSS as
.ui-iconexp
meaning "apply this to elements that contain the class ui-iconexp".
In other words you used a "selector" which matched on classname.

This is a good start, and certainly forms the basis for using CSS. NetTalk lets you add class names all over the place, and so this approach makes sense.

But other selectors also exist. And in some cases make "more sense".
For example, say you have 10 browses with this feature. By adding a classname in each procedure that's 10 time the work. Where'as it's fair to say if you want to make the change, you want it changed everywhere. So if you pick a selector that's already there, then you don't need to change the app, you just edit your custom css file, and use whatever is already there to construct the selector.

You can read up a lot on selectors on the internet of course. It's an incredibly powerful part of CSS, and one which is under used. Chrome Explorer has a brief primer here (https://www.capesoft.com/docs/chromeexplorer2/ChromeExplorer.htm#Selectors). Take a moment to read through that then use your browser tools to inspect the generated HTML to see if anything jumps out at you.
(For best results do that now, before you read on.)





ok, so maybe you say another attribute for the element;
data-do="cv"
and maybe you wondered what that was?

data-do is added by NetTalk in many places to describe the "function" of something. This attribute is used as a selector in JavaScript (which is how "code" is attached to the element) and also in some cases for CSS.

As you saw in the Chrome Explorer docs, you can select for an attribute using [ ]
Which means you can change your Custom CSS to

[data-do="cv"] {
   width: var(--icon-size);
   height: var(--icon-size);
   background-image: var(--icons);
   transform: 1.0;
}

notice, you're not using a class selector here (the .) but rather an attribute selector [ ]

Selectors are a _really_ powerful part of CSS, and you can select on all kinds of crazy things. They're well worth exploring.

Cheers
Bruce





32
Web Server - Ask For Help / Re: User feedback?
« on: March 15, 2024, 11:24:53 PM »
What Osa said.

33
Web Server - Ask For Help / Re: expand/contract CSS
« on: March 13, 2024, 09:39:44 PM »
Hi Ken,

>> but I am not seeing where I can place the class name.

That's not the right question. A better way of phrasing this question is;
"What selector can I use to attach my CSS class to the element I want to attach it to".

Does that question make sense to you? (honest question, I need to know what your level of understanding is.)
Can you _answer_ the question yourself if framed in that way?

Cheers
Bruce

34
Indeed, the file field can (should?) be blank. It's designed to accept the file name.
the "Save into Blob Field" setting should be used for blob fields.

Cheers
Bruce

35
>> The example Logging 81 displays this error

Fine, I'll fix that. But that has nothing to do with Poul's situation.

Poul is Opening a table, that has a Full Pathname variable, and that variable is not set.

Cheers
Bruce

36
Hi Jorge,

to best test this it might be useful for you to edit your HOSTS file, so that your actual domain points to 127.0.0.1
that way you can test locally still using the actual site address.

Also, it's probably worth you mentioning what version of NetTalk you are using. From your explanation of what you did it sounds like an old one.

>> I generated the crt and key certificates with the latest openssl - (both for localhost and 127.0.0.1).

this is what makes me think you're on old. Typically you can generate certificates just adding one, or both, of these to your domain list.

>> * I tried from the browser, that was one of the latest things that worked, but not anymore.

what does your browser say?

>> * It is not locked by any antivirus or firewall. I made a small Clarion testing program, to send a GET to the server, and when I try locally (for example, to https://localhost:1741 or to https://127.0.0.1:1741) it says the error was -69 which means the SSL remote certificate failed verification.

Of course it will fail. It will fail in your browser too. generating your own certificates locally (for IP addresses, or localhost) means those certificates are not signed by a CA, and so are "untrusted". This will cause most clients to fail. In aNetTalk web client you need to turn off the test for the certificate so it "doesn't check against CARoot.Pem."

<< * The server starts successfully, it says it loaded the certificates, 0 errors.

sure.

>> * The server shows there -was- a connection attempt. But it gives no error, nothing.

sure. The server doesn't care if the client failed to connect.

>> * If i started the server for localhost I tried calling localhost and used localhost named certificates, same for 127.0.0.1 - all matching)

yes but not _trusted_ certificates. (It is not possible to get a trusted certificate for localhost or 127.0.0.1. Which is why setting your local HOSTS file is probably your best bet for this sort of testing.

>> * The problem seems to be in the side of the server... But I'm not sure what else to try.
>> ** Do the openssl certificates are no longer valid for a local test??

They're valid, but they're not trusted. So your browser / client needs to bypass the trustworthy test.

>> ** What I need to test is the server response under certain conditions and performance related LOCALLY, the connection over the web works perfect!!! What am I missing for testing the server locally?

You're missing an understanding of the limitations of self-signed certificates.

>> So later, I tried connecting to the non-secure port. From Postman, succeed! It indeed connected locally.

It succeeded because it's ignoring the trustworthiness of the certificate, because it likely knows you can't trust certs on that address.
Connecting to the insecure port simply returns a redirect (assuming you are on NT10 or later) and it is following that redirect.

>> What else should I change to get the same result as Postman?

net.SSLCertificateOptions.DontVerifyRemoteCertificateWithCARoot = true

Cheers
Bruce

37
Web Server - Ask For Help / Re: expand/contract CSS
« on: March 12, 2024, 06:25:21 PM »
what does your new CSS look like?

38
Web Server - Ask For Help / Re: Multi host certificate
« on: March 08, 2024, 05:08:47 AM »
Probably you have a spelling error somewhere.

Cheers
Bruce

39
hard to say without an example.

40
Web Server - Ask For Help / Re: Re: Save form as user selects tabs?
« on: March 05, 2024, 11:02:38 PM »
what css class did you add that into?

41
Web Server - Ask For Help / Re: Save form as user selects tabs?
« on: March 04, 2024, 09:29:37 PM »
perhaps make a small example app with your code, to show where you are calling it from etc.

Also, since you are loading the record, I presume your form is in "Change" mode, not "Insert" mode?

Incidentally I _suspect_ that given the new Partial Save functionality, and given that you can turn on validation at the tab level, this could likely be reduced, and even made to work with Insert's. Make an example and I'll play with it and see.

Cheers
Bruce

42
Web Server - Ask For Help / Re: Update LineItem option in Accounts example
« on: February 29, 2024, 07:03:39 PM »
thanks, I'll keep you posted.

43
in netweb.tpw; around line 26476, connect out this block;

  #For(%tempList)
  Add(%TempList) 
  #EndFor

as in

#!  #For(%tempList)
#!  Add(%TempList) 
#!  #EndFor

Cheers
Bruce

44
Web Server - Ask For Help / Re: Mixing Small screens in Web App
« on: February 28, 2024, 10:18:51 PM »
You don't make 2 procedures Ron.
You make 1 procedure that "responds".
the responsiveness is done with CSS and is mostly automatic (although I haven't tested everything for ages, so there may be rough edges that need tidying up.)

The starting point is just to set a global option;
_Global Web Server Extension_
Web Apps tab
"Turn Off pinch-to-zoom" (set this ON)

Cheers
Bruce

45
Web Server - Ask For Help / Re: Update LineItem option in Accounts example
« on: February 28, 2024, 10:15:42 PM »
I see you're just setting a session value.

So your UI for this feature is a "global setting" of some sort (for the user) - not something on the form itself?

Pages: 1 2 [3] 4 5 ... 735