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] 2 3 ... 24
1
Web Server - Ask For Help / Re: h2 Header styling - trying to apply color
« on: November 21, 2024, 10:12:38 AM »
Of course, if you want ALL h2 elements in your app to be red it's easiest to put a line into your custom.css file


Code: [Select]
h2{color:red;}
Remember that it doesn't take a period or hash mark before the h2 designation.

2
Argh!
Yes, sorry, Johan.  Appears that I zipped it before saving from IDE.
Attached is an updated zip. 
But looks as if you put the code in about the same place as I did.

Jane


3
C10?  Guess you like skinny templates ;)
Are you on NT 14, I hope?

Revised example C10/NT14 attached.

My code in the webhandler (line 14288 in p_web.SendFile procedure) looks for both procedure name and page name as specified on the procedure template.  Forced to lower-case a few lines above.

Code in this example is:

        case loc:filename
            of 'johan' orof 'johanpage'
            orof 'john' orof 'johnpage'
                p_web.trace('case triggered')
                p_web.SendError (404,'The page cannot be found', 'The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.')
                return
        end !case   


Seems to work OK.

Cheers,

Jane


4
Quote
Something I have not looked at,
is to add code to serve "page not found" HTML

Fairly easy to do with a few lines of code in the webhandler.
Maybe something like the attached? 

(Bruce page will serve, Johan and John pages will 404.)

5
Web Server - Ask For Help / Re: Sec:Level - Multiple Ranges?
« on: September 02, 2024, 04:00:20 PM »
I don't use secwin and do my own thing for access control within web apps.

Just saying that your IF statement is logically incorrect.

6
Web Server - Ask For Help / Re: Sec:Level - Multiple Ranges?
« on: September 02, 2024, 01:16:12 PM »
Don't know about the secwin part of it, but your code doesn't look logically correct.

Maybe
if ~ (INRANGE(Sec:LEVEL,100,199)  or INRANGE(Sec:LEVEL,995,999))
etc

7
I DID attach an example zip file ;)

8
Bruce,
I must be doing something really dumb, but I can't see why this doesn't work.

In the wizarded app attached, the update form for the Customers table has a button that calls a memory form popup.  Fine.
There's also a "display" form field on which the OnClick is set to call the same popup.  Nada.
But a display form field where OnClick is set to call a URL instead of a procedure works.

What am I doing wrong, Obi Wan?


9
Web Server - Ask For Help / Re: Reboot from Running NT Application
« on: July 10, 2024, 09:20:13 AM »
BTW, you can always reboot a Windows computer with the command line:

shutdown /r /f /t 0

(May need to run asAdministrator)

Type shutdown /? at a command prompt for other options.


10
Web Server - Ask For Help / Re: PageFooter Session Manager issue
« on: June 14, 2024, 03:14:33 PM »
New js file seems to work great.

Thanks, Bruce!

11
Web Server - Ask For Help / Re: PageFooter Session Manager issue
« on: June 14, 2024, 09:11:49 AM »
>  but the session is not disconected anymore

I have not tested the new js yet.

But what I've been doing anyway in session manager template tab:

for Go to URL I have
'IndexPage?logout=1'

Then in PageHeaderTag, I have the following (my code in red)

  ! Start of "Before DivHeader"
  ! [Priority 2700]
 
  ! Secwin - Set SecurityAccess for the menu
    If p_web.Event = 'getsecwinsettings'   !NetTalk Web Menu
      GlobalErrors.SetProcedureName()
      Return
    end
  ! [Priority 7700]
    IF p_web.GetValue('logout') = 1
      p_web.SetSessionLoggedIn(0)
      p_web.Script( p_web.WindowOpen( 'indexPage' ))  ! reload to remove the visible parameter from browser
    END ! if   

  ! End of "Before DivHeader"

12
Web Server - Ask For Help / Re: PageFooter Session Manager issue
« on: June 13, 2024, 08:18:39 PM »
I haven't grokked the nt-session timer countDown method.  But it appears (?) to be subtracting from a counter variable: this.state.timeLeft -= 1

This guy suggests a different approach using a counter based on epoch time: https://abhi9bakshi.medium.com/why-javascript-timer-is-unreliable-and-how-can-you-fix-it-9ff5e6d34ee0

13
Web Server - Ask For Help / Re: Desktop app or Service
« on: June 12, 2024, 11:06:13 AM »
If you're using SelfService, query the AmService property.

https://www.capesoft.com/docs/SelfService/selfservice.htm#ObjectProperties

14
Web Server - Ask For Help / Re: PageFooter Session Manager issue
« on: June 12, 2024, 11:04:11 AM »
I'm also interested in a workaround for this.

15
Try ticking the Private checkbox on the Security tab of the WebServiceMethod you don't want documented.

Pages: [1] 2 3 ... 24