Re: LC Server - Check for Screen size?

2021-03-22 Thread scott--- via use-livecode
Matthias, thank you so much for the complete solution. I’m such a beginner with LC server (and not even a beginner at JS) that your explanation was what I needed. -- Scott Morrow Elementary Software (Now with 20% less chalk dust!) web https://elementarysoftware.com/ email sc...@element

Re: LC Server - Check for Screen size?

2021-03-21 Thread Rick Harrison via use-livecode
Hi Matthias, Thanks! Rick > On Mar 21, 2021, at 7:51 AM, matthias rebbe via use-livecode > wrote: > > Hi Rick, > here's a sample with some put commands and comments for better understanding. > -- read Cookie screeres if available > put $_COOKIE["screenres"] into tScreenRes > > if tScreenRes

Re: LC Server - Check for Screen size?

2021-03-21 Thread matthias rebbe via use-livecode
Hi Rick, here's a sample with some put commands and comments for better understanding. " -- the cookie does not exists or is empty, so we now executing JS, but -- the following closing tag is mandatory, otherwise the js is not executed ?> let screenwidth = (screen.availWidth);

Re: LC Server - Check for Screen size?

2021-03-20 Thread Rick Harrison via use-livecode
Hi Matthias, So you are thinking something like: Your Screen: var txt = ""; txt += "

Total width/height: " + screen.width + "*" + screen.height + "

"; txt += "

Available width/height: " + screen.availWidth + "*" + screen.availHeight + "

"; txt += "

Color depth: " + screen.col


Re: LC Server - Check for Screen size?

2021-03-20 Thread matthias rebbe via use-livecode
As Livecode Server runs on the server there is no direct command/function in LC Server available for this task. But you could use Javascript (document.cookie) in your LC Server script to write the screen resolution into a cookie and read that cookie then with your Livecode Server script. -

LC Server - Check for Screen size?

2021-03-20 Thread Rick Harrison via use-livecode
I was wondering if there is anyway to check for the device type or screen size of the connected device for LC Server so I can serve the correct size screen? Thanks, Rick ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url