User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 423,764 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,391 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting

Hide/Show html forms using javascript

Join Date: Apr 2008
Posts: 3
Reputation: yesintlcorp is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
yesintlcorp yesintlcorp is offline Offline
Newbie Poster

Re: Hide/Show html forms using javascript

  #2  
Apr 29th, 2008
Try this one out you might like it:

Here is a small piece of code which will give you your browser details such as...
current resolution
maximum resolution
browser name
browser version:
color depth
code name
platform
java status


  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>Browser Details...</title>
  6. <script language="javascript" type="text/javascript">
  7. function details() {
  8. window.onerror=null;
  9. document.frmDetails.navigator.value = navigator.appName;
  10. document.frmDetails.version.value = navigator.appVersion;
  11. document.frmDetails.colordepth.value = window.screen.colorDepth;
  12. document.frmDetails.width.value = window.screen.width;
  13. document.frmDetails.height.value = window.screen.height;
  14. document.frmDetails.maxwidth.value = window.screen.availWidth;
  15. document.frmDetails.maxheight.value = window.screen.availHeight;
  16. document.frmDetails.codename.value = navigator.appCodeName;
  17. document.frmDetails.platform.value = navigator.platform;
  18. if (navigator.javaEnabled() < 1) document.frmDetails.java.value="No";
  19. if (navigator.javaEnabled() == 1) document.frmDetails.java.value="Yes";
  20.  
  21. }
  22.  
  23. </script>
  24. </head>
  25.  
  26. <body onload="details();">
  27.  
  28.  
  29. <form name=frmDetails>
  30. <table border=1 width=499>
  31.  
  32. <tr>
  33. <td width="133">current resolution:</td>
  34. <td width="350" align=center><input type=text size=4 maxlength=4 name=width>
  35. x <input type=text size=4 maxlength=4 name=height></td>
  36. </tr>
  37.  
  38. <tr>
  39. <td>
  40. browser:</td>
  41. <td align=center><input type=text name=navigator></td>
  42. </tr>
  43. <tr>
  44. <td>
  45. max resolution:</td>
  46. <td align=center><input type=text size=4 maxlength=4 name=maxwidth>
  47. x <input type=text size=4 maxlength=4 name=maxheight></td>
  48. </tr>
  49.  
  50. <tr>
  51. <td>
  52. version:</td>
  53. <td align=center><input type=text name=version></td>
  54. </tr>
  55.  
  56. <tr>
  57. <td>
  58. color depth:</td>
  59. <td align=center><input type=text size=2 maxlength=2 name=colordepth> bit</td>
  60. </tr>
  61.  
  62. <tr>
  63. <td>
  64. code name:</td>
  65. <td align=center><input type=text name=codename></td>
  66. </tr>
  67.  
  68. <tr>
  69. <td>
  70. platform:</td>
  71. <td align=center><input type=text name=platform></td>
  72. </tr>
  73.  
  74. <tr>
  75. <td>
  76. java enabled:</td>
  77. <td align=center><input type=text size=3 maxlength=3 name=java></td>
  78. </tr>
  79.  
  80. <tr>
  81. <td colspan=2 align=center>
  82. <input type=button name=again value="Refresh?" onclick="details();"></td>
  83. </tr>
  84. </table>
  85. </form>
  86.  
  87. </body>
  88. </html>


This comes from http://www.weberdev.com/get_example-4758.html

Thanks,

Yesintlcorp
<snipped>
Last edited by peter_budo : Apr 30th, 2008 at 7:45 am. Reason: Keep It Organized - plase use [code] tags
Reply With Quote  
All times are GMT -4. The time now is 2:02 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC