Determining screen resolution using JavaScript or PL/SQL
MalcAJul 21 2010 — edited Jul 21 2010Hi all,
I want to make a region conditional on the screen resolution of the client.
What would be ideal is to be able to access the resolution with an API like owa_util.get_cgi_env and do it all in PL/SQL, but I don't think there's a parameter for client screen resolution is there? Is there another API I can use?
Failing that, I can access the resolution using screen.height and screen.width in JavaScript, and set an application item if it is 1024 x 768 (this is a tablet PC for demos via a projector, hence the low resolution), then reference that item in the region condition. I cannot get JavaScript to set the item though - I have tried Jarola's code from another post:
var a = new htmldb_Get();
a.add(application_item,value);
var r = a.get();
but can't get it to work, the application item's value doesn't change. Has anyone any suggestions?
regards,
Malcolm.