NetTalk Central
Toggle navigation
Login
Register
×
Welcome,Guest
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
NetTalk Central
»
NetTalk Web Server
»
Web Server - Ask For Help
»
Detect small screen?
« previous
next »
Print
Pages: [
1
]
Author
Topic: Detect small screen? (Read 3201 times)
Poul Jensen
Full Member
Posts: 191
Detect small screen?
«
on:
January 08, 2024, 11:33:20 PM »
In other tools you can dectect whether client is on small or large screen and thus adapt the amount of information shown on a screen.
Either by hiding/unhiding fields or even calling separate procedures.
Is this possible in NT14?
tia
/Poul
Logged
Niels Larsen
Sr. Member
Posts: 431
Re: Detect small screen?
«
Reply #1 on:
January 09, 2024, 02:45:49 AM »
Hi Poul
I'm pretty sure Bruce will answer: Use CSS - @media
Look here:
https://www.w3schools.com/cssref/css3_pr_mediaquery.php
Also try to see how it's used in netweb.css under /styles
Pretty easy once you get the idea
/Niels
Logged
Poul Jensen
Full Member
Posts: 191
Re: Detect small screen?
«
Reply #2 on:
January 09, 2024, 03:20:49 AM »
Hi Niels,
Thanks for the info.
So there is no way to use that or similar logic inside the app?
Cheers
/Poul
Logged
Niels Larsen
Sr. Member
Posts: 431
Re: Detect small screen?
«
Reply #3 on:
January 09, 2024, 05:03:16 AM »
It is possible to get the current screen size from the two session values _ScreenWidth_ and _ScreenHeight_
But I think you're doing yourself a bj?rnetjeneste by following that road and you're unlikely to avoid using css anyway.
Logged
Poul Jensen
Full Member
Posts: 191
Re: Detect small screen?
«
Reply #4 on:
January 09, 2024, 10:43:06 AM »
Ok noted
/Poul
Logged
osquiabro
Hero Member
Posts: 687
Re: Detect small screen?
«
Reply #5 on:
January 09, 2024, 04:28:34 PM »
for me in login detected the size with this code
IF p_web.gsv('_screenWidth_') < 600 ! is mobile
p_web.ssv('Loc:css',' col-xs-12')
ELSE
p_web.ssv('Loc:css','')
END
Logged
Bruce
Global Moderator
Hero Member
Posts: 11245
Re: Detect small screen?
«
Reply #6 on:
January 09, 2024, 08:36:02 PM »
Use CSS - @media
Logged
Poul Jensen
Full Member
Posts: 191
Re: Detect small screen?
«
Reply #7 on:
January 10, 2024, 02:33:18 AM »
Thanks guys.
Logged
Print
Pages: [
1
]
« previous
next »
NetTalk Central
»
NetTalk Web Server
»
Web Server - Ask For Help
»
Detect small screen?