aspose file tools*
The moose likes JSP and the fly likes How to pass values from the Form? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "How to pass values from the Form?" Watch "How to pass values from the Form?" New topic
Author

How to pass values from the Form?

Amy Howard
Ranch Hand

Joined: Jul 11, 2002
Posts: 86
My Browse Page has two listboxes. One is server list, another is TLA listbox. The link image "Search" will display Search page which has the same values of server and TLA which the user selected from the previous page Browse.
The following code can't get server and appTLA value. Do you know what the problem is?
<A href="myTest/controller/SearchFiles?server="+document.forms[0].search.value + ";appTLA=" +document.forms[0].appTLA.value +" onfiltered="MM_swapImgRestore()" onfiltered="MM_swapImage('navsearch','','<%=ctxPath%>/images/nav_search_ov.gif',1)"><IMG name="navsearch" border="0" src="<%=ctxPath%>/images/nav_search_up.gif" width="142" height="18"></A>
Thanks for the help in advance!
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61598
    
  67

When all is said and done, what does the href attribute of the "a" tag look like when the page is sent to the browser? It looks like there may be a few formatting problems with the URL you are constructing.
hth,
bear


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Amy Howard
Ranch Hand

Joined: Jul 11, 2002
Posts: 86
The following code works correctly without passing any value from the Browse page to the Search page.
<A href="myTest/controller/SearchFiles" onfiltered="MM_swapImgRestore()" onfiltered="MM_swapImage('navsearch','','<%=ctxPath%>/images/nav_search_ov.gif',1)"><IMG name="navsearch" border="0" src="<%=ctxPath%>/images/nav_search_up.gif" width="142" height="18"></A>
Geeta Ramasami
Ranch Hand

Joined: Mar 05, 2003
Posts: 72
Hi,
In seperating the parameters in the querystring u need to use & and not ;.I think u have used ';',thats y u r not getting it..
Try using it like this:
<A href="myTest/controller/SearchFiles?server="+document.forms[0].search.value + "&appTLA=" +document.forms[0].appTLA.value +" onfiltered="MM_swapImgRestore()" onfiltered="MM_swapImage('navsearch','','<%=ctxPath%>/images/nav_search_ov.gif',1)"><IMG name="navsearch" border="0" src="<%=ctxPath%>/images/nav_search_up.gif" width="142" height="18"></A>
Cheers
Geeta
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to pass values from the Form?