• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 158
  • Last Modified:

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!  
0
smyers2003
Asked:
smyers2003
  • 3
  • 3
1 Solution
 
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
 
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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now