unable to get value returned from javascript variable in page

unable to get value returned from javascript variable in page

Hi, I have 3 pages....i wrote a js function to get the value of radio button from one jsp page..what i want is to store the value returned from the js function and store it in a variable so that i can use it in my servlet to validate an if else condition.

FirstPG:

TEST:
PRODUCTION:
ACCEPTANCE:

2nd page is a normal jsp page...and then from that page i am redirecting to my servlet :

protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // TODO Auto-generated method stub

    //System.out.println(request.getAttribute("name"));
    String uname=request.getParameter("uname");
    String pass=request.getParameter("pass");

    //Stringconnect=request.getSession().setAttribute("radiovalue",request.getParameter("env"));
    String connect=request.getParameter("env");
    System.out.println(connect);
    if(uname.equals("admin")&& pass.equals("admin"))
    {
        response.sendRedirect("SuccessAdmin.jsp");

    }
    if(uname.equals("sauro")&& pass.equals("sauro")){
        response.sendRedirect("Success.jsp");
    }
}

I want the value of the radio button from fisrt page to be stored in a variable so that i can use it throughout all the servlets.

please help

View Answers









Related Tutorials/Questions & Answers:
unable to get value returned from javascript variable in page
unable to get value returned from javascript variable in page  Hi, I... jsp page..what i want is to store the value returned from the js function... the value of the radio button from fisrt page to be stored in a variable so
how to assign javascript variable value to a jsp variable
how to assign javascript variable value to a jsp variable  how to assign javascript variable value to a jsp variable
Advertisements
javascript variable value insertion in DB
javascript variable value insertion in DB  how can I insert javascript variable value into database using php
Get session value in javascript
Get session value in javascript   How to iterate session value onebyone in JavaScript
get textfield value in javascript
get textfield value in javascript  How to get and the set value of text field in JavaScript?   Get the text field value in JavaScript <html> <head> <script type="text/javascript"> <
passing value from javascript popup
passing value from javascript popup  How to take user input and pass that input value using popup in Javascript
Getting environment variable value from java
Getting environment variable value from java  Getting environment variable value from java
Getting Json data from servlet to javascript variable
Getting Json data from servlet to javascript variable  How do i get json data from my servlet on to a variable in javascript n bind the data to display onto sigma grid.Has anyone Idea how to do
passing textbox value from one page to another page using html n javascript
passing textbox value from one page to another page using html n javascript  on button onclick event pass text box value and i want to pass value of variable at onclick event of button and also want to print it in textbox
unable to get datas from oracle database
unable to get datas from oracle database  Dear Sir, I am again struck in my project.. i want to display data from oracle database but i get... know what i am wrong!! kindly help me in this. out.jsp <%@ page
Type casting the returned value of a method.
Type casting the returned value of a method.  Hi, How do you type cast the returned value of a method so that you can avoid creating a temporary variable. Here's an example: panel.getComponent(i).(OnOffButton)setState('0');ADS
Assign value from a <bean:write> tag to a variable
Assign value from a tag to a variable  I am calling a stored procedure from JSP page which needs an input parameter. This input parameter needs to get the value from bean write tag . How can i do that ?   Please go
passing value from javascript to jsp - JSP-Servlet
passing value from javascript to jsp  Hi... Is there any way to get the value from the javascript and print it on the current jsp page or print an array onto the current jsp page using javascript  Hi Friend, We
Unable to get data from class - Development process
Unable to get data from class  I get this code from the internet which read from comm port of the computer & modify is as below:- package COM... the getWeight() function from this ComControl class when i click the Jbutton2
JSP Value to JavaScript
to pass the value from JSP to JavaScript. The JavaScript create a function that accepts the value from the jsp page.  Understand with ExampleADS_TO_REPLACE_1... have create a function addition() which takes the value from the jsp page. When
get JavaScript onto a web page
get JavaScript onto a web page  How do we get JavaScript onto a web page
Assigning a value to JSP variable from a bean class. - JSP-Servlet
Assigning a value to JSP variable from a bean class.  Hi, I want to know how we can assign value to a JSP variable from a Java Bean. I am using Struts, JSTL. Which tags should I use to assign the value. e.g Kindly
unable to display table data on JSP page that is coming from mysql and servlet.
unable to display table data on JSP page that is coming from mysql and servlet.  I am unable to show table data on JSP page using servlet and mysql. only two rows data i showing but in my database I have five fields
unable to display table data on JSP page that is coming from mysql and servlet.
unable to display table data on JSP page that is coming from mysql and servlet.  I am unable to show table data on JSP page using servlet and mysql. only two rows data i showing but in my database I have five fields
unable to display table data on JSP page that is coming from mysql and servlet.
unable to display table data on JSP page that is coming from mysql and servlet.  I am unable to show table data on JSP page using servlet and mysql. only two rows data i showing but in my database I have five fields
how to get time picker value in javascript of struts2
how to get time picker value in javascript of struts2  I am not able to get value of time picker in java script . my code is jsp java script var totime=dojo.widget.byId("totime").getValue(); how to get value please help me
How to get javascript function return value in xsl - XML
How to get javascript function return value in xsl  Hi friends , i have a doubt on xsl, i want to know how to get value from javascript function to xsl variable with small piece of code,i need immediately , if anybody plz send ur
how to call the array variable in scriptlet from javascript function
how to call the array variable in scriptlet from javascript function  This is the scriptlet code:- <% String[] abc={"saab","volvo","bmw","Benz","Porsche","Jaguar"}; %> Actually i want the array variable one by one
how to pass form values from javascript of html page to jsp page
how to pass form values from javascript of html page to jsp page   This is my sample html page which contains inline javascript which calculates... to submit all the form values with lattitude and longitude returned from
how to get HTTP GET request value using javascript
how to get HTTP GET request value using javascript  how to get HTTP GET request value using javascript   how is how you can get HTTP GET request value using javascript: var parameter = window.location.search.replace
How I get a variable from java script to use it in the scriptlet of jsp.
How I get a variable from java script to use it in the scriptlet of jsp.  Hi i want to get the tinyUrl value in the scriptlet of jsp...").value = tinyUrl; } BitlyClient.shorten(url, 'BitlyCB.shortenResponse
JSP Variable in Javascript
JSP Variable in Javascript          JSP Variable in Javascript helps you to pass jsp variable to javascript. The JavaScript include a function
how to get the value of a label field of option tag in javascript?
how to get the value of a label field of option tag in javascript?  example <select> <option label="2" value="A">A<...;/select> can i get the label value in javascript
JavaScript display variable in alert
JavaScript display variable in alert  How to display variable in alert box? I am using javascript.   <html> <head> <script... variable is declared by using var keyword.This variable can hold any type of value
How to save and get value from JSP
How to save and get value from JSP  Employee Name Time... 324 2012-12-12 save i want to save dis value jsp to action ...how can i get all value ..and store..how can its values goes
get value from multiple textbox in jsp
get value from multiple textbox in jsp  how to get multiple textbox value in another jsp? If i using the following code <%for(int i=0;i<3;i++) {%> <td>name<input type="text" class="name" id="name">
get the value from another class - Java Beginners
get the value from another class  Hello to all, I have stupid question. I have main.java and ConfigXML.java(read my config xml file). Code from...().trim(); [/code] How I can get String alsl = ((Node)flnameTEXT.item(0
Pass value from JSP to JavaScript
Pass value from JSP to JavaScript       We can also pass the value from a JSP page to the java... a function hello() which takes value from the jsp page on click of some button
how to load value in dropdown list after selecting value from first dropdown list using javascript
how to load value in dropdown list after selecting value from first dropdown list using javascript  how to load value in dropdown list after selecting value from first dropdown list using javascript
session value not get in many jsp page.
session value not get in many jsp page.  I am using servlet to set...,response); and get session value on jsp page by follwing:- (adsbygoogle...)session.getAttribute("user"); this is work but when this code is use in other jsp page its give
How to change the value of a variable which is set in jsp (by jstl method) by calling the function from js?
How to change the value of a variable which is set in jsp (by jstl method) by calling the function from js?  How to change the value of a variable which is set in jsp (by jstl method) by calling the function from js? I set
How to pass javascript variable in Scriplet of JSP?
How to pass javascript variable in Scriplet of JSP?  How can I assign the value of a javascript variable to a variable declared in jsp scriplet? Is it possible
How to pass the value from controller to jsp page ?
How to pass the value from controller to jsp page ?  HI I need to pass the value from controller to jsp. I use the way like this Controller request.setAttribute("msg", "Successfully Login"); In jsp ${msg} and then i
PHP Array get key from value
In php array one can get the key from value by the use of array_search function Array_search function searches the key for the given values in the array. Example of PHP Array Get Key from Value <?php $product=array
you pass a variable by value.
you pass a variable by value.  How do you pass a variable by value?   Hi friends, Just like in C++, put an ampersand in front of it, like $a = &$b /*--------------Pass By value----------------*/ function add
Get radio button value after submiting page
Get radio button value after submiting page  Radio buttons are dynamically generated.After selecting radio button & submitting the page , the value of the selected radio button get displayed in that jsp page. <
Get form value in same page - JSP-Servlet
Get form value in same page  Hello friends, Can we get a form field value in the same to be processed in java coding. For example
passing text value from pop up to parent page
passing text value from pop up to parent page  i want to pass value of a textbox of one pop up window to its parent page(html). that parent page contain a table. And i want to pass that text value to one cell in table of parent
Java swing: get selected value from combobox
Java swing: get selected value from combobox In this tutorial, you will learn how to get selected value from combobox. The combobox provides the list... imposed an actionlistener on the combobox in order to get the selected value from
Get JTextField value from another class
Get JTextField value from another class   ... value from other class. For this, we have created two classes ClassA.java and ClassB.java. In ClassA, we have defined a textbox 'text1' that will get the value from
How to get more than one value from ajax
How to get more than one value from ajax  I have multiple select list box in php. i filled the value using ajax. how to get different value to fill the same list box Ex. option value as id (adsbygoogle
Unable to execute JSP page
Unable to execute JSP page  I have written one jsp file. It contains html tags and jsp directives. I have saved the file with the extension .jsp... folder. But I could not execute the JSP page. Please help me
php variable in javascript
php variable in javascript  Access php variables in Javascipt or Jquery rather than php echo $variable
Java example program to get the environment variable
the environment variable value. To get the single environment variables value we have... Java example program to get the environment variable       java get environment variable
Get current page URL from backing bean
Get current page URL from backing bean  How to get current page URL from backing bean

Ads