You need to embed Javascript into your JSP.

1) Attach an "onChange" handler function to the <SELECT> </SELECT>
2) You need a Hidden form field call it "command" and give it a empty default all.
3) In your handler Make the handler recall the JSP.
4) Recode your JSP to examine the command CGI parameter ie. 
"request.getParameter("command")"

function dropDownHandler( String docommand ) {
{
     document.myForm.command.value = docommand;
     document.myForm.submit();
}

...

<form >
     <input type=hidden name="command" value="" >

     <select size="1" name="fruits" onChange="dropDownHandler('settingFruits")" >
          <option value="apple">Apple</option>
          <option value="pear">Pear</option>
     ...
     </select>
</form>

Hope it helps
--
Peter Pilgrim
G.O.A.T
                    "the Greatest Of All Time"



---------------------------------------- Message History 
----------------------------------------


From: "Singh, Jasbinder" <[EMAIL PROTECTED]>@java.sun.com> on 16/01/2001 13:37 PST

Please respond to A mailing list about Java Server Pages specification and reference 
<[EMAIL PROTECTED]>

DELEGATED - Sent by:     A mailing list about Java Server Pages specification and 
[EMAIL PROTECTED]>


To:   [EMAIL PROTECTED]
cc:
Subject:  Re: Calling the same jsp


But I am not using the submit method.
I have 2 drop down boxes.
The first drop down box has values taken from a table.
Based on the value selected in the first drop down box I have to populate
the second drop down box.

JS

-----Original Message-----
From: S Ramakrishnan [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 16, 2001 11:25 AM
To: [EMAIL PROTECTED]
Subject: Re: Calling the same jsp


Just use the same jsp file name for the
POST or GET action in the form.

Hans Bergsten's (O'Reilly) book has
an example of such usage.

Rk
x77309
----- Original Message -----
From: "Singh, Jasbinder" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 16, 2001 11:13 AM
Subject: Calling the same jsp


> Hi All,
>
> I call a jsp called "abc.jsp".
> In that jsp I set some parameters and then need to call the same jsp
again.
> Do I need to call a servlet and then call the jsp "abc.jsp" again or do I
> have a way to call the same jsp directly ?
>
> Thanks
> JS
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



--

This e-mail may contain confidential and/or privileged information. If you are not the 
intended recipient (or have received this e-mail in error) please notify the sender 
immediately and destroy this e-mail. Any unauthorised copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden.

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to