473,394 Members | 1,715 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Missing Hidden form fields

Hello,

I am using JBoss 4.2.1.GA with tomcat 6.0, and i am not able to figure out this
problem.

Code:

//test.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?
Oct 25 '07 #1
0 1824

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

Similar topics

10
by: Randell D. | last post by:
Folks, Perhaps someone can figure this out - this is 'the process of my script' I have a form whereby I can add multiple contacts to a single address. There is only one...
6
by: dmiller23462 | last post by:
Here is the code, it's not complete of course....I've been inserting lines as I go to pinpoint the issue.....I understand that the error message I'm getting (#185 Missing Default Property) is...
1
by: mark.reichman | last post by:
First off.. Thanks to Grant Wagner for help in a previous thread related to this one. I am at a total loss... I have multiple fields in a form with the same name. Lets call the fields with the...
13
by: Dan R Brown | last post by:
I have a large form that is generated dynamically in a jsp using xml / xslt. So, to break up this form into several "tabbed" sections, I break up the form using <div> tags. Each <div...
1
by: Sam Wuebben | last post by:
I would like to add a few hidden field values to a form as it is submited via JavaScript. I have a static page shopping site that uses MIVA shopping cart. Some of the pages are getting quite...
5
by: NTE | last post by:
Access 2000, My application has a main form that the users interact with. There are 2 hidden fields. When they select "filter by form" from the menu, the hidden fields become visble. Is...
5
by: Roshawn Dawson | last post by:
Hi, Are hidden fields passed in the querystring when a form is posted back? If they are, must the hidden fields be server controls in order to access them from .net code? Thanks, Roshawn
0
by: BcNexus | last post by:
Hello all, The search function of this forum isn't working although I found a similar question on the forum using Google, but the replies don't help me. So, forgive me please if this has been...
1
by: mark | last post by:
Forgive me if this seems like a stupid question but I need help... I'm trying to do a simple online form that emails me the results from a few fields. Here is the code: <form...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.