473,785 Members | 2,882 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

58 New Member
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 2772
r035198x
13,262 MVP
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.getPara meter("inputNam e");
It's cleaner that way as you can submit the form using the post method.
Mar 29 '07 #2
shanmukhi
58 New Member
You can set the value in a hidden input and get it in the next JSP using request.getPara meter("inputNam e");
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 MVP
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
shanmukhi
58 New Member
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?<%=v alue%>
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 MVP
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?<%=v alue%>
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
shanmukhi
58 New Member
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
shanmukhi
58 New Member
please provide a good solution for my problem.
thank u
Mar 29 '07 #8
r035198x
13,262 MVP
i used only href
You can use something like
[HTML]

<FORM method="post" action="<%=jsp2 Path%>" name="formName" >

<a href="javascrip t:document.form s['formName'].submit()" ....

<INPUT type="hidden" name="value" value="<%=value %>">
</FORM>
[/HTML]
Mar 29 '07 #9
shanmukhi
58 New Member
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='javascrip t:subwindow()'> "+customer+ "</a>");
[code]
what i can write in subwindow() function to extract link value
please help me
Mar 30 '07 #10

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

Similar topics

35
2555
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 SQL statement(content) of these queries, though I've noticed some VB code for that. Is that because it's simply impossible to get a query content (not query resultset) from a SQL stmt? Thanks in advance.
1
1539
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 incrementing/decrementing the vaules in the form. So my website consists of forms... Each form has a number of columns and rows. I am generating each page using a php script and some templates. Because the exact layout of each page can change based on customer...
10
3701
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
5299
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 and that the extensions are right. However, I can't seem to access the actual values of the fields to start with. If I simplify my problem, can anyone tell me why this would work in a Javascript alert:
6
5857
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 ID="FldType_add" Runat="server" DataSource='< %#GetFieldType()%>' DataValueField="Type" DataTextField="Type" /> Oce the page is loaded all the values are added to the dropdown list. But when I thought of getting the selected value from the...
15
3536
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 AS IDENTITY ( START WITH 1
7
1570
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: 100 b: 200 I get the feeling this is trivial, but I have been unable to find an answer on my own.
0
3396
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 within options. I have everything being dynamically named from the previously dynamically named element. (I hope this makes sense.) I am not able to retrieve any of the dynamically created values. I can view them on the source page but can't pull them...
4
1708
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 which in turn encrypts it and passes it to the next cgi script (again through url). The third cgi script is also able to retrieve the values (using the param method), it adds another variable to the url and passes to the next cgi script.. The...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10327
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10151
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10092
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9950
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7499
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6740
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5381
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.