request.parameter doesn't seem to be working - HELP!

Hello everyone,

This is driving me CRAZY - I have a .jsp page which has two forms on it, and I am submitting two forms with the click of one button. Each form is directed towards its own .jsp page, and they will both come back and display correctly in the target page. HOWEVER, each target .jsp page (that I am submitting to from each form), requires the SAME parameter that is being submitted from a txtfield on one of the forms from the original page. No problem grabbing the parameter from the form which CONTAINS the txfield, but I also have a hidden field in my second form (which requires the SAME parameter, and I am presently filling with the original txtfield value using javascript and an onClick() call from the submit button.) Now, when I do an output of request.parameter on each target .jsp page, the first one seems to receive the value ok, while the second one always comes back as empty, null, etc. Is there something that I am overlooking here? Are there any other ways to do this? Any help would be appreciated!  
smyers2003Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

reginabCommented:
wait are you saying you are filling a hidden field int he second one and passing the value in the onclick, or are you saying you are trying to pass to the second target from the first form. that will not likely work unless the second target knows about both forms, probably the harder way.  because you will need to be pretty explicit with form property naming stuff.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
smyers2003Author Commented:
Hmm - I know, this sounds confusing. Basically, I am filling a hidden field on form2 with the onClick() method. I am then submitting BOTH forms when the user clicks the submit button. When I do a request.parameter("hiddenFormFieldvalue") on form2's target page, it is coming back as null. Everything is working ok for form1 and its target .jsp page.

Thanks very much - I hope that clears things up a little.
0
smyers2003Author Commented:
I can even SET the "value" attribute of the hdnfield and it is STILL not showing up in the request.parameter of the target page.

Here is the applicable code:
<Form name="frm1" action="search.jsp" method="POST" target="panel1">

.........       

INPUT style="WIDTH: 61px; HEIGHT: 21px" size=3 id=txtSearchTerm name=txtSearchTerm>&nbsp;
<INPUT style="WIDTH: 48px; HEIGHT: 24px" type=submit size=14 value=Search id=submit1 name=submit1 onClick="fillHidden();loadPanel()">
</P></TD></TR>
</Form>

<Form name="frm2" action="blah.jsp" method="POST" target="customerInfo" id=frmLDAP>
<input type="hidden" name="txtLDAPSearchHidden" id="txtLDAPSearchHidden">
</Form>

Thanks very much for any help!
0
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

reginabCommented:
and I am guessing though not assuming then that fillHidden knows the name of frm2, it will need to if it does not. then does the loadpanel fill both targets then?
0
smyers2003Author Commented:
Reginab,

I was doing some more investigating and it is funny you mentioned loadPanel(). This actually loads the two requested pages into two different sources - one being a single iframe, and another being a set of iframes. Needless to say, tricky to target, especially from a frameset. In any case, an iframe needs a.src, and when I targeted the first iframe with a src (i.e. blah.jsp), it looks as if the call to the iframe .src is STRIPPING the resulting querystring. I figured this out by manually adding a querystring and reloading the targeted .jsp page, and after that it is indeed getting the parameter now. I now have a new problem, but it is .jsp based i nature. I will try to award you these points for at least responding. If you would like to know what the .jsp prob is, I will be placing it in the .jsp forum.
0
reginabCommented:
thx, i will check out the jsp.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JSP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.