how to invoke a jsp value to another jsp

Hi i have a problem on how to invoke a jsp page from jsp page.

I have this function in index.jsp:

<script language="JavaScript">function price(){ window.location="search_date.jsp" + document.forms['test'].getElementById('price');}</script>

"document.forms['test'].getElementById('price'); " are getting the values from another jsp (search_date).

<div class="tabbertab" title="Price" id="price"><h2>Tab 2</h2>

<form name="test">

There are three tabs in search_date jsp, the above codes are for price tab.

Im going to click on an image link in index.jsp, it will direct me to the price tab instead of two other tabs. How can i achieve this?

Thanks,

tiffany

[1011 byte] By [chiataia] at [2007-11-26 14:55:39]
# 1
I wish I could help, but you haven't provided enough information for me to understand what the problem is. Please explain clearly and provide more relevant code. I don't know if you're looking for jsp:forward
appy77a at 2007-7-8 8:44:11 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

This appears to be more of a javascript than java/JSP question.

If you are trying to pass a parameter to the jsp search_date.jsp, you need to follow the standard syntax for parameters , with ? for the first and & for any subsequent ones..

ie

search_date.jsp?firstParam=1&secondParam=2

so possibly you meant:

window.location="search_date.jsp?myParam=" + document.forms['test'].getElementById('price');

However I am not sure.

What is clicking on this image link supposed to do?

Are you wanting to reload a page, or just show hide things without reloading?

evnafetsa at 2007-7-8 8:44:11 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
Why not you use a submit button, with hidden fields ?
renga_muralia at 2007-7-8 8:44:11 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...