Jump to content


Photo

Screen size


  • Please log in to reply
2 replies to this topic

#1 natalieG

natalieG
  • Members
  • PipPipPip
  • Advanced Member
  • 63 posts

Posted 11 June 2006 - 03:40 PM

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?he...idth=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

#2 joquius

joquius
  • Members
  • PipPipPip
  • Advanced Member
  • 319 posts

Posted 11 June 2006 - 04:08 PM

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.
z..z..z..z..z..z..z..z..

#3 natalieG

natalieG
  • Members
  • PipPipPip
  • Advanced Member
  • 63 posts

Posted 11 June 2006 - 07:47 PM

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.c...th&sch=aheight");
//-->
</script>
</head>
<body>
</body>

</html>




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users