Plisken
07-10-2003, 01:19 PM
Hi. I want to get the users screen resolution and save it in my DB. The problem is that I can’t assign a javascript variable to a PHP variable because the PHP script is run before the javascript. So what I need is to create a javascript that can assign the screen resolution value into a hidden field in a form and then submit the form automatically. When the page is posted back to itself I can get a hold of the values that I need. I've been able to do this with a simple script that forwards the user to the same page and sends the width and height as a querystring, but I have to be able post the variables through a form. Could someone please help me here? Is it possible to have a javascript submitting a form (without the user’s knowledge)?
Thanks,
Shawn
Thanks,
Shawn