Generating A URL Based On Two Drop Down Box Selections?

Jul 18, 2009

I have a javascript function that will load a CSV file in to a grid:

Code:

function load(url){
table.setURL(url);
table.request();
}
<button onClick="load('URLTONEWFILE.CSV')">Load New File</button>

This works perfectly, however I need to take it a step further to load CSV files, based on user choices from two drop down boxes. Something like this:

Code:

<form name="myform"">
<select name="mycolour">

[code]....

View 1 Replies


ADVERTISEMENT

Mulitple Selections From A Drop Down...

Apr 28, 2004

We have a site we are working on in which we use drop downs for easy search functions. (We also have an advanced seach which use check boxes) But... the client has been asking us if we can make a muliple selection happen from this quick search. There are only like 20 options to choose from but a scrolling text box will look awfull there.. as the drop downs work nicely.

Has anyone ever seen a muliple selection drop down? Or something like it?

View 8 Replies View Related

Dependent Drop-down With Selections In An Array?

Sep 12, 2011

My current project is available for perusal in order to assist me at: [URL]As you can see, I make it so that once the product type is selected, you can then select a wattage. This dependent drop-down works, however I want it so that when I select a value in the left-hand side (wattage), then the one on the right will offer a pre-defined value that replaces the wattage I have.

For example, a GU-10 in 'Type of Lamp' offers a 50, 35 and 20 watt bulb in 'Current Lighting Products'. In 'Energy Efficient Products', it offers 5 and 3. I wish to make a statement somewhere so that if they select 50 on the left, it selects 5 on the right. If they select 35 on the left, it select 3 on the right.

I would also like it to do multiple offers, so that if they select say, a 35 of the MR-16, I want the right hand side to offer both 5 and 3. The only way I can think of doing this is via a lot of 'IF' statements.

View 13 Replies View Related

JQuery :: Animation Based On Radio Button Selections?

Jan 21, 2011

The animation that I envision coding with jQuery has proven too advanced for me at the moment. Might anyone know of an example that would help me achieve the below (simplified to the barest minimum to make sense):

I'm building a page that is split into two halves... the left half has six radio button choices: blue, red, green, yellow, purple, and black. The right half is empty. When a radio button is selected in the left half (for this example, I'll say "blue" is selected), I'd like a blue square to bounce (jQuery UI "easeInBounce") into a specified area on the right half. Then, if "green" is selected... the blue square that was already on the right half would fade out (jQuery "fadeOut") and then I'd like a blue square to bounce (jQuery UI "easeInBounce") into the same specified area on the right half.

Might anyone know of a demo that would allow me to code this? The demo can be similar (using different animations), but I'd like to see how it uses radio buttons to control an animation, and to check to see if there is already a target in existence... which would make the "fadeOut" necessary.

View 2 Replies View Related

Query :: Create A Table Based On Selections From A Php / Mysql?

Oct 7, 2011

Firstly this isnt a double post, I stupidly posted in the Java forum not the java script forum. Im trying to create a dynamic table based on the selections of multiple lists as per here Screen Shot

A user would select thier choices from the various lists and then add them to a table - this is where my question comes in. How do I achieve creating a table which will grow depending on how many additions a user adds?

Hope I make sense, Im trying to get my head around this.

View 14 Replies View Related

Drop Down Menu Disable/enable Selections?

Apr 2, 2010

What I'm Looking to do is base certain options in a dropdown menu in a form off of the first selection, like this

Code:
Selection 1
Option 1

[code]....

View 1 Replies View Related

Selections From Drop-Down Box Automaticly Create Multiple Tables?

Jul 10, 2009

Wonder if there is a way to have my Drop-Down box selections create individule single row/dual colume tables for each item that was selected from the drop-down box. An example would be:

1: I selected 3 items from my drop-down box at one time (my drop-down box allows multiple selections).

2: I click a button call "Create Template" and three new single row/dual colume tables are created with the names if the items.

Here is what I have so far, but need a little help. Notice I have added the three tables in to show how it should look but this is for information only as these should be created automaticaly.

[Code]...

View 1 Replies View Related

Redirect The User To A Certain Page, Based On The Selections They Made Among The Radio Buttons?

Mar 1, 2010

I'm not one for making my own scripts, so not quite sure about the best way to go about doing this. I've got a form with 2 different sets of radio buttons. Upon submitting, I'd like to redirect the user to a certain page, based on the selections they made among the radio buttons.

View 2 Replies View Related

JQuery :: Show/hide Form Elements Based On Radio Button Selections ?

Mar 17, 2011

I have a set of radio buttons on my pricing page:

And a corresponding text_field input element div I'd like to display based on which radio button the user selects:

When the page loads, I'd like to see:

When the user clicks on a (different) radio button, or clicks one for the first time, I'd like whichever div is currently showing to be hidden, and the newly selected one to be shown.

Right now I have jQuery code at the bottom of my page that looks like this:

For each of the four options.

When the page loads, the correct div is shown, and when I select a new button, the new div is shown, but the already showing one isn't hidden.

I've read some posts that suggest using change() instead of click(), but others indicate that's problematic in IE.

View 1 Replies View Related

IFrame DOM - Generating Multiple IFrames Based On How Many Times The User Clicks An Add Button

Jul 15, 2009

Im generating multiple iFrames with javascript based on how many times the user clicks an Add button. Each click generates one iFrame. All the iFrames are being generated with the same id/name. What Im having Javascript trouble with is A) figuring out which iframe is which by number (myframe[0], myframe[1], myframe[2],etc) and B) how many iframes are on the page. For A) is there a way to tell what the number value is besides hard coding it? Right now Ive been playing with this in the src page.. window.frameElement.id but that just returns "myframe" and not the number. Ideally I would like to find the number as its being created on the parent page instead of getting it from the src page, here's what I have now for that...

[Code]...

View 1 Replies View Related

Change A Drop Down Based On What Is Selected In A Seperate Drop Down?

Jun 26, 2006

I've got 2 drop down select lists. The first one would have something like

-Category 1
-Category 2
-Category 3

Then what I'd like to happen is when you select one of those categories the next drop-down below it loads something like

--Sub Category 1
--Sub Category 2
--Sub Category 3

Any idea how I'd pull that off?

View 1 Replies View Related

Evaluate Drop-down Based On Text?

Aug 31, 2009

Curious about the following issue. I currently have a dynamic drop-down based on the value of each option.. If selection in top drop-down is B it will show all options with a B contained in the second/resulting drop-down.

Now - I also want to evaluate the options by having the script check for a few keywords..

Example - have it evaluate the drop-down on page load for options with text containing 'blah123' (ex. <option value="0323G">Qwerty - blah123</option>). And if any of the options have that text the script will generate an additional drop-down menu allowing you to select blah123 or other specified text. Say another thing I'd like to search each text string for is 'abump'. If there is 'blah123' and 'abump' contained within the drop-down, a third drop-down menu will be generated (as said before) with only blah123 and abump as options. Whichever of these is selected will narrow down the options available in the final drop-down menu.

View 4 Replies View Related

Display Img Based On Drop Down Selection?

Jan 7, 2010

I have a simple html form that asks a user to select a state from a drop down list. Later, in the same form, there's a question that needs to display an image of the state they previously selected from the drop down menu. How can I accomplish this using javaScript?

View 12 Replies View Related

Display Of Table Based On Drop Down Selection?

Nov 17, 2010

This code is able to display a table and show me state, County, Genus and GenusCount and also it shows when I select option as All for Counties in my drop down. it can based on which it can change my table and give me State, all the Counties, its Genus, GenusCount but when I select a particular County and then select for genus in my drop down menu. It is not working correctly. This is my code.http://paste.flingbits.com/m58f9160Example: If I select `Tennessee->Anderson->All` it should display in tables

<pre>
_____________________________
|State |County |Genus |

[code]....

View 1 Replies View Related

Build String Based On Several Drop Downs

Aug 25, 2010

I'm trying to build a string based on three drop downs. As each drop down choice is made, I want to append the string and redisplay it. When finished the string will be a complete (but not hyperlinked) URL.

My drop downs look like this:

HTML Code:

PHP Code:

Here's how it supposed to work...

When an admin has used the first drop down to pick the value of the "first" variable, the string is updated and redisplayed like so:

Next, when an admin has used the second drop down to pick the value of the "second" variable, the string is updated and redisplayed like so:

Finally, when an admin has used the third drop down to pick the value of the "third" variable, the string is updated and redisplayed like so:

That's all I have. I'm stuck. I'm guessing I need an "onChange" event with each drop down? Also, I need to refresh the "makeTheLink" div when an onChange event fires? How do you tie all of this together? Is self rolled JavaScript the best solution or would jQuery be better?

View 4 Replies View Related

How Would I Reveal Something Based On What Item Was Selected In A Drop Down?

May 18, 2006

I've got a drop down with a listing of categories (Books, Apparel, Music, etc) for adding products to a database.

When the user select "Apparel" I want it to reveal a <div> with extra options. But I "only" want it to respond to if apparel was selected. If books, music, etc are selected, it should do nothing.

View 1 Replies View Related

Dynamic Drop Down List Based On Text Field Value

Nov 25, 2009

I have a form that has a pretty complicated combo box - a user starts typing text, it queries a database for matches, and displays the results to the user. The user can then select the match they desire and it has a value id, which I am currently sending to a hidden field in the form. So, for example: user starts typing in a movie name, Seven - it returns Seven and user selects it. The form submits the id of the movie seven (say 12) to a hidden field.

Where I am stumped: Once a user selects a movie title, I have another drop down select box that is to display the available formats of the movie by querying my database based on the product id (12) and returning the available formats in the list:

DVD
BLUERAY
VHS

I am pretty good at programming, but I cannot figure this out - how to make the select box fire and return results once the value for the textbox has been captured.

View 1 Replies View Related

Change Form Fields Based On A Drop-down List?

May 16, 2010

I need to be able to change the fields of a form based on a drop-down list. Like if someone picks option A field 1 shows and if they change it to option B field 1 and 2 show up without reloading the page.

If you need me to explain more I will try to do a better job. If I could be pointed in the general direction that would be great, I dont exactly need to be spoon-fed, although I do like spoons if you catch my drift .

View 2 Replies View Related

Populating City Drop Down Based On Country Selection?

Feb 17, 2009

I have a property site and I currently have it set up do that when entering a property the person selects a country.Depending on the country selected, the town drop down populates with certain towns in that country.ecause of the number of countries this javascript is pertty large and that worries me slightly. Also, if someone hasjavascript turned off then it doesn't work.In order to make it more accessible, would I have to seperate the form into 2 sepertate pages.

View 1 Replies View Related

Setting A Textfield Based On Dynamically Populated Drop-down?

May 23, 2011

I'm using PHP / MySQL / javascript (very new to javascript)I'm looking to set the value of a textfield based on the name (NOT value) of a drop-down. The drop-down is created dynamically from a recordset (see code below):

<select name="mainStory" id="mainStory">
<?php
do {
?>[code].....

View 6 Replies View Related

How To Show Amounts In Drop-down Based On Selected Option?

Nov 26, 2006

Does anyone know of a Javascript that will show an amount in a drop down based on what was selected in the previous drop down? Example: Code:

<select id="car">
<option value="volvo">Volvo</option>
<option value="audi">Audi</option>
</select>

<select id="price">
<option value="">Please select</option>
<!-- show this if volvo -->
<optgroup id="vol">
<option value="30000">30000</option>
<option value="31000">31000</option>
</optgroup>
<!-- show this if audi -->
<optgroup id="aud">
<option value="40000">40000</option>
<option value="41000">41000</option>
</optgroup>
</select>

View 9 Replies View Related

JQuery :: Drag And Drop Portlet System Based On DotNetNuke?

Jun 5, 2009

Just wanna show of our portal system based on DotNetNuke <span class="il">jQuery</span> and jQueryUI We took the sortable example and modified it with up down movement animation slide into place smooth animation drag to delete and click to delete restore functionality

[Code]...

View 1 Replies View Related

Show/hide Elements Of A Form Based On Drop Down Box Selection

Feb 13, 2006

I am setting up a contact form, and want to have a drop down box with a handful of options. Clicking one option should display fields to input username & password, whereas all others will not. So far, I've tried and (replacing 'none with 'block' for the option that is supposed to show the input fields) but neither does what I need it to. I'm fairly new to javascript, just muddling my way through with the aid of tutorials.

View 2 Replies View Related

Display The Table Contents Based On The Selecting From Drop Down Menu?

Oct 16, 2010

I have triple drop down menu. I want to display the contents of the table based on the third menu selection. The code is in the link [URL]

I know I need to include a onchange function to <select name="genus"> but as you can see I have a <div> already for it. I am confused how to create the function to display the table and also the how to include another div tag.

View 1 Replies View Related

Show/Hide Text And Form Field Based On Drop Down Selection

Jul 20, 2005

I'm trying to show/hide a simple piece of text and a text field on a
form based on what choice is made from a drop down box.

<select name="dropdown" size="1">
<option selected value="">Please make a selection</option>
<option value="1">Choice 1</option>
<option value="2">Choice 2</option>
<option value="3">Choice 3</option>
<option value="4">Other</option>
</select>

i.e. if Choice 2 is selected I'd like to display a new <tr> with the
following:

<tr>
<td>New text field:</td>
<td><input name="newField" type="text size="20"></td>
</tr>

if any other choices are made, I don't want to display anything.
I've tried several onchange() functions but can't achieve what I'm
looking for.

View 6 Replies View Related

Direct Users To A Search Page Based On The Values Of Two Drop Down Boxes - Onclick Not Working

May 2, 2011

I am trying to use it to direct users to a search page based on the values of two drop down boxes. The issue i am having is that the code below works fine on a test page, but not on my test domain (with wordpress theme) and so i was wondering whether there is anything I am doing wrong... Is onclick already defined maybe? I'm not sure how it works to be honest... :(

<script type="text/javascript">
function gosearch() {
var breed = document.getElementById('breed').value;
var area = document.getElementById('area').value;
var site = "http://hairloss-help.net/?s=";
var searchurl = site + breed + area;
[Code]...

View 7 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved