I am using JRun3.0 server.by changing value of hidden variable using javascript using request.getParameter() in the jsp its giving null value.
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Ashish_Jain
Posted On:   Friday, April 29, 2005 03:49 AM

I am calling one javascript method on clicking one button. as there is one hidden variable i declared in tag and my javascript testsc() method is function testsc() { alert(document.SalesConfForm.flag.value); document.SalesConfForm.flag.value = "1"; alert(document.SalesConfForm.flag.value); document.SalesConfForm.submit(); } ]]>]]> now in <% tag i am accessing that hidden variable as <% String flg = request.getParameter("flag"); if (flg == null) flg = "0"; System.out.println("FLG =="+flg); %> here the value is printing null.. actually i want to call i mean   More>>

I am calling one javascript method on clicking one button.
as


there is one hidden variable i declared in

tag
and my javascript testsc() method is




now in <% tag i am accessing that hidden variable as
<%
String flg = request.getParameter("flag");

if (flg == null)
flg = "0";

System.out.println("FLG =="+flg);
%>


here the value is printing null..
actually i want to call i mean refresh the same form by checking the value of the hidden variable 'flag'.. if particular button is pressed i have to call same form otherwise i have to call different form..

as

<% if(flg.equals("1")
{
%>

<%
}
else
{
%>

<%
}
%>

how can i do this as this is giving null value so it is by default calling abc.jsp    <<Less
About | Sitemap | Contact