473,382 Members | 1,705 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Retrieving variable values set in Form A to use in Form B

hi all

in jsp
i created a combo box and i written a java script to select values from combo box.
when i select a value from combo box it should go to the another jsp page
for that i passed the selected value as a string along with the url in java script.
like <a href=..........?<%=val%>
then how can i get this value into another jsp page.

please any body can help me.....
its urgent for me
Mar 29 '07 #1
10 2743
r035198x
13,262 8TB
hi all

in jsp
i created a combo box and i written a java script to select values from combo box.
when i select a value from combo box it should go to the another jsp page
for that i passed the selected value as a string along with the url in java script.
like <a href=..........?<%=val%>
then how can i get this value into another jsp page.

please any body can help me.....
its urgent for me
You can set the value in a hidden input and get it in the next JSP using request.getParameter("inputName");
It's cleaner that way as you can submit the form using the post method.
Mar 29 '07 #2
You can set the value in a hidden input and get it in the next JSP using request.getParameter("inputName");
It's cleaner that way as you can submit the form using the post method.

where can i write that hidden input value
can you please provide a simple code for it
Mar 29 '07 #3
r035198x
13,262 8TB
where can i write that hidden input value
can you please provide a simple code for it
You need to put that on a form on the JSP that is submitting the page. Do you have a form on the page?
Mar 29 '07 #4
You need to put that on a form on the JSP that is submitting the page. Do you have a form on the page?

sorry i didn't get you,
i cant explain entire senariou now
imagine one.jsp is there
in that i written one combo, i took some values from data base into that combo
for selection i written java script like ...two.jsp?<%=value%>
i should pass these values to two.jsp
there i want to disply those values as hyperlinks...
how i get those values into two.jsp

please help me
Mar 29 '07 #5
r035198x
13,262 8TB
sorry i didn't get you,
i cant explain entire senariou now
imagine one.jsp is there
in that i written one combo, i took some values from data base into that combo
for selection i written java script like ...two.jsp?<%=value%>
i should pass these values to two.jsp
there i want to disply those values as hyperlinks...
how i get those values into two.jsp

please help me
Ok. How are you going from JSP one to JSP2. Are you clicking a submit button on a form or are you using an href link?
Mar 29 '07 #6
Ok. How are you going from JSP one to JSP2. Are you clicking a submit button on a form or are you using an href link?

i used only href
Mar 29 '07 #7
please provide a good solution for my problem.
thank u
Mar 29 '07 #8
r035198x
13,262 8TB
i used only href
You can use something like
[HTML]

<FORM method="post" action="<%=jsp2Path%>" name="formName" >

<a href="javascript:document.forms['formName'].submit()" ....

<INPUT type="hidden" name="value" value="<%=value %>">
</FORM>
[/HTML]
Mar 29 '07 #9
thank u very much for your reply...
but this code was not worked for me...

some how i got it...

but i got another problem

how can get a selected hyper link value into java script function
for eg:
in my jsp page
[code]
out.println("<a href='javascript:subwindow()'>"+customer+"</a>");
[code]
what i can write in subwindow() function to extract link value
please help me
Mar 30 '07 #10
r035198x
13,262 8TB
thank u very much for your reply...
but this code was not worked for me...

some how i got it...

but i got another problem

how can get a selected hyper link value into java script function
for eg:
in my jsp page
[code]
out.println("<a href='javascript:subwindow()'>"+customer+"</a>");
[code]
what i can write in subwindow() function to extract link value
please help me
Let me move this to the javascript forum then. I think it belongs there now
Mar 30 '07 #11

Sign in to post your reply or Sign up for a free account.

Similar topics

35
by: NickName | last post by:
I understand it's easy to list all saved queries of a given Access database via Msysobjects system table. However, I have not seen any posting over this NG or other similar ones that also include...
1
by: Captain Dondo | last post by:
I am not really experienced in Javascript so bear with me.... I am working with an embedded platform; no mouse, no keyboard. Just up, down, left, right keys and +/- keys for...
10
by: Girish | last post by:
Hi Everyone, I am passing a form to a php script for further processing. I am able to retrieve the last value set for that given form variable using $variable=$_REQUEST;
4
by: namanhvu | last post by:
Hi everyone, I am trying to create a form for authorised users to upload photos to an image gallery. I'm attempting to perform simple validation of the fields by ensuring the fields aren't empty...
6
by: yasodhai | last post by:
Hi, I used a dropdown control which is binded to a datagrid control. I passed the values to the dropdownlist from the database using a function as follows in the aspx itself. <asp:DropDownList...
15
by: gunnar.sigurjonsson | last post by:
I´m having some problem retrieving identity value from my newly inserted row into a view. I have two tables T1 and T2 which I define as following CREATE TABLE T1 ( id BIGINT GENERATED ALWAYS...
7
by: rodrigo | last post by:
How would I go about retrieving a variable's name (not its value)? I want to write a function that, given a list of variables, returns a string with each variable's name and its value, like: a:...
0
bmallett
by: bmallett | last post by:
First off, i would like to thank everyone for any and all help with this. That being said, I am having a problem retrieving/posting my dynamic form data. I have a form that has multiple options...
4
mehj123
by: mehj123 | last post by:
Hi... I have written some cgi scripts and I need to pass the user id and password between them.. There is a Login page which passes the user name and password to another cgi script through the url...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.