I'm trying to pass a javscript variable to php to be used as a php variable. Code looks like <script> screen_width=screen.width //I want to use this screen_width in php </screen> <?php $screen_width= ;//I want screen_width to be assigned to this ?> 1# I dont want to pass the variable through form and $_get since it loads the page again and takes visitor to a new page. Is there any way that it could be done with $_post without redirecting but with reloading ( more suitably autoreloading .) 2# Is there a way I can assign js var to php variable with ajax,iframes .. Any help will be appreciated.Thanks