Is it possible to use Java "screen.width" in RB?
May 31, 2021 23:46:14 GMT -5
Post by donnybowers on May 31, 2021 23:46:14 GMT -5
I'm not familiar with Java Script (or any web scripting language except HTML, CSS and a little PHP), but I'm realizing that there are a lot of things you can't do with RB alone. To create a really good website you need to be able to determine the user's screen width (pixels) at the very least. Screen height would also be helpful because it would enable you to (for example) roughly determine if the user is using a cell phone or a PC/Laptop.
If anyone knows how to use Javascript (or some other scripting language) to easily determine the user's screen dimensions it would be extremely helpful to me and to many other RB users who want to format an app for the user's screen dimensions. The hardest thing about web development isn't placing the data on the web page, but placing it on there in a way that is convenient and easily readable for the user.
I'm mostly interested in how to get the users screen width into an RB variable, i.e. screenWidth or screenWidth$. I can then use this variable to define a table width, font's, image sizes, etc. which can then be rendered to comfortably fit the user's device display. Being able to do this with screen height would be very useful also because then you could rearrange a set of elements horizontally on a wide screen (i.e. PC or Laptop) and vertically on a tall screen (i.e. most Cell Phones).
w3schools Java - screen.width property
If anyone knows how to use Javascript (or some other scripting language) to easily determine the user's screen dimensions it would be extremely helpful to me and to many other RB users who want to format an app for the user's screen dimensions. The hardest thing about web development isn't placing the data on the web page, but placing it on there in a way that is convenient and easily readable for the user.
I'm mostly interested in how to get the users screen width into an RB variable, i.e. screenWidth or screenWidth$. I can then use this variable to define a table width, font's, image sizes, etc. which can then be rendered to comfortably fit the user's device display. Being able to do this with screen height would be very useful also because then you could rearrange a set of elements horizontally on a wide screen (i.e. PC or Laptop) and vertically on a tall screen (i.e. most Cell Phones).
w3schools Java - screen.width property