1 Reply Latest reply on Oct 27, 2007 1:37 AM by Joan Horta Tosas

    Missing Hidden Values

    Ashok Venkat Newbie

      Hello,
      This following peice of code was working fine with jboss 3.2.7 and tomcat 5.0. After i upgrdaed to JBoss 4.2.1.GA with tomcat 6.x, the code no longer works.


      //login.jsp
      
       if(request.getParameter( "ScreenResolutionHeight" ) == null )
       {
      %>
      <html>
      <head>
       <title>Please wait one moment...</title>
      </head>
      <body onload='SubmitOnLoad();'>
      
      <form method='post' id='ScreenResolutionForm'>
      <input type='hidden' name='ScreenResolutionWidth' value='1024'>
      <input type='hidden' name='ScreenResolutionHeight' value='768'>
      
      <script>
      function SubmitOnLoad()
      {
       var this_form = FindElementById( 'ScreenResolutionForm' );
       this_form.ScreenResolutionWidth.value = window.screen.availWidth;
       this_form.ScreenResolutionHeight.value = window.screen.availHeight;
       this_form.BrowserType.value = navigator.appName;
      
      
       this_form.submit();
      }
      
      function FindElementById( id )
      {
       if( document.getElementById )
       {
       return document.getElementById( id );
       }
       else if (document.layers)
       {
       return document.layers[id];
       }
       else if (document.all)
       {
       return document.all[id];
       }
      
       return undefined;
      }
      </script>
      
      </body>
      </html>
      <%
       }else {
       ............
      


      After the form the submitted to itself in the SubmitOnLoad method, the hidden values are no longer available in the request object.As a result, the page gets into an endless loop.

      Any ideas?