natalieG Posted June 11, 2006 Share Posted June 11, 2006 we have an indexfile [index.php] with a form in it. we want to pass the screen height and width as URL parameters in the form ie:action="http://aaaaaa.php?height=scnwidth&width=scnwidth";getting the screen parameters in Javaxcript is simple enough, but how do we pass them to the form We can put them in hidden controls if thats easier and can put themin session variables if that is the best way.Thanks,Jennifer Link to comment https://forums.phpfreaks.com/topic/11716-screen-size/ Share on other sites More sharing options...
joquius Posted June 11, 2006 Share Posted June 11, 2006 generally it's better to use a hidden form field and set value="<js>document.attrib</js>" // yes i know <js> doesn't exist (wish it did)then just load those values using $_POST['field']; sadly you will need a page refresh as java prints only after php. Link to comment https://forums.phpfreaks.com/topic/11716-screen-size/#findComment-44307 Share on other sites More sharing options...
natalieG Posted June 11, 2006 Author Share Posted June 11, 2006 Any idea why this will not redirect?<html><head> <title></title><script LANGUAGE="JavaScript"><!--VAR awidth=screen.width;VAR aheight=screen.height; location.replace("http://msdsimaging.com/atmelpim/showscreen.php?sch=awidth&sch=aheight");//--></script></head><body></body></html> Link to comment https://forums.phpfreaks.com/topic/11716-screen-size/#findComment-44384 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.