as written you're initiating a GET method ("?Id=100&val=200"). in addition the form
Parameter name is "Id" while the jsp is looking for a Parameter named "ID". on top
of that your request.getParameter("ID"); can't be an integer. it's an  Object or
String.


try this:
first the form element "Id" has to be declared within the form with some sort of
input tag type like "text" or "hidden", then named, then assigned a value:
<input type="hidden" name="Id" >
then your javascript can look like this:

function submitInfo() {
document.frm.Id.value="200";
 document.frm.method="post";
 document.frm.action="test.jsp";
 document.submit();
}

in your JSP do this:
<% String progId = request.getParameter("Id");
//change progId to an integer or do what you gotta do
   ....
   ....
%>



Geeta Kottapalli wrote:

> I am trying to send some values from one page to
> another or to the same page while submitting the form
> as :
> function submitInfo() {
>  document.frm.method="post";
>  document.frm.action="test.jsp?Id=100&val=200"
>  document.submit();
> }
>




>
> In the JSP page when I request for the values as
>
> <% int progId = request.getParameter("ID");
>    ....
>    ....
> %>
>
> the values requested are null.
> Please help me.In JDeveloper where I developed the
> application worked fine.But when I deployed in JWS
> most of my JavaScript is not working.
> If anyone of you know why this is happenning or any
> suggestions how to solve it please.... let me know.
> Thanks,
> Geeta
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Photos -- now, 100 FREE prints!
> http://photos.yahoo.com
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> 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".
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