Jump to content

Archived

This topic is now archived and is closed to further replies.

natalieG

Screen size

Recommended Posts

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 them
in session variables if that is the best way.

Thanks,

Jennifer

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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>

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.