Re: Is this possible?
by "Tim Rivera" <lists(at)timrivera.com>
|
| Date: |
Tue, 18 Mar 2003 22:14:22 -0500 |
| To: |
"Beauford.2002" <beauford.2002(at)rogers.com>, "HWG Basics" <hwg-basics(at)hwg.org> |
| References: |
p1 |
| |
todo: View
Thread,
Original
|
|
> 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
This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.