MDanz Posted February 18, 2010 Share Posted February 18, 2010 anyway to work around this. i need to get the user's screen resolution in php. But the code to get the screen resolution is in javascript. Anyway to do this? <script language="javascript"> function getClientResolution() { //document.write(); var res = $get(""); res.value = screen.width + 'x' + screen.height; } </script> Link to comment https://forums.phpfreaks.com/topic/192477-how-to-get-javascript-variables-into-php/ Share on other sites More sharing options...
teamatomic Posted February 18, 2010 Share Posted February 18, 2010 Do a search on the posts here. I just answered it like yesterday or the day before. HTH Teamatomic Link to comment https://forums.phpfreaks.com/topic/192477-how-to-get-javascript-variables-into-php/#findComment-1014184 Share on other sites More sharing options...
btherl Posted February 18, 2010 Share Posted February 18, 2010 You can use javascript to set a form value, then submit the form. Or you can send it using AJAX (which is a whole topic in itself). Link to comment https://forums.phpfreaks.com/topic/192477-how-to-get-javascript-variables-into-php/#findComment-1014185 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.