473,770 Members | 2,028 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

passing the selected value of dropdown box to the next html page

54 New Member
Hello acoder. I want to know another type of passing values between pages

I have three frames
frame1 for main horizontal menu
frame 2 for vertical submenu
frame 3 which is is loaded based on frame 2 submenu seletion

now i want to have value to be passed between the pages on frame3 based on submenu selection in frame 2


the frame2 has submenu as below
in a table there are two images based on selection of these i'm loading frame3

[HTML]<td><a onmouseover="sw apImage()" onmouseout="swa pImgRestore()" target="right_b ottom" href="page1.htm l" >
<img id="img" src= "Images.jpg " alt="img" name="img" border="0"/>
</a>
</td>
<td><a onmouseover="sw apImage()" onmouseout="swa pImgRestore()" target="right_b ottom" href="page2.htm l" >
<img id="img2" src= "Images2.jp g" alt="img" name="img2" border="0"/>
</a>
</td>
[/HTML]
now i want to pass value from page1 to page 2
please give me some idea
thanks
Feb 8 '08 #1
13 8697
sindhu
54 New Member
Hello folks
. I want to know another type of passing values between pages

I have three frames
frame1 for main horizontal menu
frame 2 for vertical submenu
frame 3 which is is loaded based on frame 2 submenu seletion

now i want to have value to be passed between the pages on frame3 based on submenu selection in frame 2


the frame2 has submenu as below
in a table there are two images based on selection of these i'm loading frame3

[HTML]<td><a onmouseover="sw apImage()" onmouseout="swa pImgRestore()" target="right_b ottom" href="page1.htm l" >
<img id="img" src= "Images.jpg " alt="img" name="img" border="0"/>
</a>
</td>
<td><a onmouseover="sw apImage()" onmouseout="swa pImgRestore()" target="right_b ottom" href="page2.htm l" >
<img id="img2" src= "Images2.jp g" alt="img" name="img2" border="0"/>
</a>
</td>[/HTML]

now i want to pass value from page1 to page 2
please give me some idea
thanks
Feb 8 '08 #2
acoder
16,027 Recognized Expert Moderator MVP
Which value do you want to pass?
Feb 8 '08 #3
sindhu
54 New Member
Hello,
I want to pass the selected value of dropdown list to next page based on the selction of a menu in the same frameset

Please help me out
Feb 8 '08 #4
acoder
16,027 Recognized Expert Moderator MVP
I've split and merged some posts into this new thread.

Post the code for the drop down box. When you say you want to pass to the page, where should it be available? Does some element's value need to be set? Show the code for the page that the value has to be passed to.
Feb 8 '08 #5
sindhu
54 New Member
there are three frames.
frame1 - mainmenu
frame2- submenu
frame3-display pages based on submenu

The dropdown is in all the pages that i'm displaying in frame3 by using submenu.the selections are

Expand|Select|Wrap|Line Numbers
  1. <select id="ddbx" class="textBlackMedium"  style="width: 87px" name="ddbx" onchange="switch"> 
  2.           <option>OP 1</option>
  3.             <option>OP 2</option>
  4.           <option>OP 3</option>
  5.             <option>OP 4</option>
  6. </select>
  7.  
now when i select 1in submenu, i'm loading the frame3 with 'page1' in which i've the dropdown shown above.
now if i change the selection to 'OP 2' in the dropdown, and select submenu item to load 'page2' in the frame three replacing 'page1' , i want the dropdown in that page to be having the selcted value 'OP 2'.

below is the code to change the pages in frame3

[HTML]<tr style="width:11 1px;height:30px "><td >
<a onmouseover="sw apImage()" onmouseout="swa pImgRestore()" target="right_b ottom" href="page1html " >
<img id="img1" src= "Images1" alt="1" name="img1" border="0"/></a></td></tr>
<tr ><td >
<a onmouseover="sw apImage()" onmouseout="swa pImgRestore()" target="right_b ottom" href="page2.htm l">
<img id="img2" src= "Images/2" alt="2" name="img2" border="0"/></a></td></tr>
[/HTML]
this is the sub menu with two options. target='right_b ottom' , here right_bottom is the name of frame3. i'm using href to chnge the page on change.

now i wnt the changed value in dropdown of any page to be reflected in the pages after changing the submenu selection
Feb 8 '08 #6
acoder
16,027 Recognized Expert Moderator MVP
As a full member now, you should know that we expect your code to be posted in [code] tags (See How to Ask a Question).

This makes it easier for our Experts to read and understand it. Failing to do so creates extra work for the moderators, thus wasting resources, otherwise available to answer the members' questions.

Please use the tags in future.

MODERATOR.
Feb 8 '08 #7
acoder
16,027 Recognized Expert Moderator MVP
The dropdown is in all the pages that i'm displaying in frame3 by using submenu.the selections are

Expand|Select|Wrap|Line Numbers
  1. <select id="ddbx" class="textBlackMedium"  style="width: 87px" name="ddbx" onchange="switch"> 
  2.           <option>OP 1</option>
  3.             <option>OP 2</option>
  4.           <option>OP 3</option>
  5.             <option>OP 4</option>
  6. </select>
  7.  
now when i select 1in submenu, i'm loading the frame3 with 'page1' in which i've the dropdown shown above.
now if i change the selection to 'OP 2' in the dropdown, and select submenu item to load 'page2' in the frame three replacing 'page1' , i want the dropdown in that page to be having the selcted value 'OP 2'.
In your onchange function call, get the selected value of the drop down, e.g. document.getEle mentById("ddbx" ).value (you will need to set the value of each option). Then access the frame, e.g. parent.right_bo ttom and set the value of the drop down by setting its value.
Feb 8 '08 #8
sindhu
54 New Member
Hello i'm able to fetch the value of the selected dropdown box from the dropdown and save it in a 'temporary variable'(like assigning it to a hidden button value) in the submenu frame. now i'm calling another page from submenu using href="page2"
during this call i want to pass the selected index value stored in temporary variable.

how do i do this in href="page2.htm l?"

What do i need to include after the question mark?

the temporary value is in


<input name="btn_hid" id="btn_hid" style="position :absolute; left: 17px; top: 106px;visibilit y=hidden">
</input>

and i'm calling the page in href as below

<a onmouseover="sw apImage('img_md ','','Imagest1. jpg',1)" target="right_b ottom" href="page2.htm l" >
<img src= "Images2.jp g" alt="img2" name="img_md" border="0"/>
</a>



href ib bold is the point from where i'm passing the value to page2.html and assigning it to dropdown in that page

thanks
Feb 11 '08 #9
acoder
16,027 Recognized Expert Moderator MVP
You could use document.getEle mentById("btn_h id").value to get the value.

Pass it using page2.html?val= ...
Feb 11 '08 #10

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

Similar topics

24
77394
by: London | last post by:
Hello Can you help me. By ASP How can I get the dropdown(control'name)'s selected value? What is it's property'name?
12
6558
by: Kevin Lyons | last post by:
Hello, I am trying to get my select options (courses) passed correctly from the following URL: http://www.dslextreme.com/users/kevinlyons/selectBoxes.html I am having difficulty getting the courses to pass the correct option value and then be displayed at the following URL: http://www.dslextreme.com/users/kevinlyons/selectResults.html I am passing countries, products, and courses. The first two display
1
4616
by: Kevin Lyons | last post by:
Hello, I am trying to get all of my form elements passed correctly from the following URL: http://www.dslextreme.com/users/kevinlyons/selectBoxes.html to the following URL: http://www.dslextreme.com/users/kevinlyons/selectResults.html I am passing name, email, countries, cities, products, courses, etc. The others display as they should on the subsequent page,
1
2848
by: Andy Sutorius | last post by:
Hi, I have 4 panels, each panel has a dropdown and a "next" button. I would like to get the selected value of the dropdown after the next button is clicked. I thought I could use the following (ddlChooseEmail.SelectedValue) to grab the value but it does not work. Is there something special about panels that I need to do in order to get the selected value of the dropdown? Thanks,
2
8095
by: Monty | last post by:
I use a SELECT dropdown as the nav interface for jumping to a chosen page number. When I setup up the SELECT element on the page, I want to show the user the current page number they are on, so, I put "selected" next to the page number, as shown below: ------------------------------- <form name="pick" method="post" action="showit.php"> <select name="pggo" onChange="this.options.selected;document.pick.submit();">
1
10399
by: Ben | last post by:
I have a formview with a few dropdownlists (software version, database version, etc). When a software version is selected, the database version dropdownlist updates itself accordingly. When in edit mode, everything works fine - the selected value in each list defaults to the value from the database record (selectedvalue=bind...). However, in insert mode (insertitem), it is not working. I pass in a value on the query string that I would...
7
2422
by: brendan.wong | last post by:
hello. i have a really simple form that asks the user to select a Month from a dropdown. the first time a user visits the page, the highlighted option should be October, which works fine. then, if the user submits the form, i want the dropdown to highlight whatever selection that the user made in the resulting page. for example, if the user chose February, then the code in the resulting page would look something like <option...
1
2857
SHOverine
by: SHOverine | last post by:
Recently my web host decided to "upgrade". This change rendered many of my pages useless and I am scrambling to fix the issues, so you may see several posts from me in the coming days. My first issue is that all of my dropdown menus are passing the last row to the next page as the session variable. The pages that I am talking about can be found at: Weekly13_Test The code that follows was operational until the change. Here is my...
9
9921
by: ajos | last post by:
Hello friends, After thinking about this for sometime, i decided to post this in the java forum. Well my problem here in detail is, i have 3 jsp pages where in a.jsp(for example) i have a combo box, based on the selection of the value in that combo box, b.jsp page gets populated with the value associated to a.jsp, and again based on the selection of value of the 2nd combobox my 3rd combo box gets populated, which is in c.jsp. I'm able to...
0
9454
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
10101
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
10038
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
9906
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...
0
8933
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6712
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
5354
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...
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2850
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.