Re: LC Server - Check for Screen size?
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?
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?
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?
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?
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. -