| hwg-basics archives | Mar 2003 | new search | results | previous | next |
Re: Is this possible?by "Tim Rivera" <lists(at)timrivera.com> |
|
> I have this javascript that gets a users screen resolution - is it possible
> to use the output in a form as a hidden value so it can be later be written
> to a database, and if so how?
My guess is that this would work (without word-wrapping):
<form ... >
<script language="javascript" type="text/javascript">
document.write("<input type=\"hidden\" name=\"width\" value=\"" +
window.screen.width + "\">")
document.write("<input type=\"hidden\" name=\"height\" value=\"" +
window.screen.height + "\">")
</script>
</form>
Tim
>
> <Script language = JavaScript>
>
> UserWidth = window.screen.width
> UserHeight = window.screen.height
> UserWidth = "Screen Width = " + UserWidth
> UserHeight = " Screen Height = " + UserHeight
>
> document.write(UserWidth + UserHeight)
>
> </Script>
HTML: hwg-basics mailing list archives, maintained by Webmasters @ IWA