By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,078 Members | 2,159 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,078 IT Pros & Developers. It's quick & easy.

does the method to transfer value from javascript variable to html form valid?

P: 1
Expand|Select|Wrap|Line Numbers
  1. <script>
  2. document.mldsform.screen_height.value = screen.height;
  3.  
  4. document.mldsform.screen_width.value = screen.width;
  5. </script>    
  6.  
  7. <body>
  8. <form id="mldsform" action="/QoEMLDS/qoe" method="post">
  9.  
  10. <input type="hidden" id="screen_width" name="screen_width" value=""></input>
  11.  
  12. <input type="hidden" id="screen_height" name="screen_height" value=""></input>
  13. </form>
  14. </body>
Jul 16 '10 #1
Share this Question
Share on Google+
1 Reply


Dormilich
Expert Mod 5K+
P: 8,639
yes and no.

1) validate your HTML
2) consider when (at which time) your script runs
3) please make up a sensible post title and place the question in the thread post
Jul 16 '10 #2

Post your reply

Sign in to post your reply or Sign up for a free account.