Listboxes
Oct 12, 2004I'm trying to populate a second listbox from values in a first listbox. I have the following javascript and it works when moving values to the second list box but not backwards Code:
View 2 RepliesI'm trying to populate a second listbox from values in a first listbox. I have the following javascript and it works when moving values to the second list box but not backwards Code:
View 2 RepliesSuppose that I have a combo box filled with unique numbers handled from beans. And next a listbox including numbers and some names again handled from a beans. Now I want to make the listbox dependent to the combo box. When I select the number within combo box I want the listbox show the names related to this number. I only know that I should use Javascript. onChange event e.g Can anyone ghelp me about how the Javascript function should be?
View 1 Replies View RelatedI want to dynamically generate list box options using the content of an sql database in real time. More specifically, i have a page with a couple of listboxes, when i click on an option in the first list box, i want the second list box to update with options that reflect the first one, in real time generated by the sql database.now i was wondering if it might be possible for javascript to send some thing to php which php could decode and search the database and return the results of that search. here is how i imagine the process to look in psudeo code:- user clicks on an option (say the 3rd option) in the 1st listbox- javascript catches the event, and sends some data to php indicating the 3rd option from the 1st listbox has been clicked- php tells sql to search for records that correlate with the 3rd option from listbox 1- php sends search result back to javascript- javascript populates the 2nd listbox with search resultsi want to do this with out having to refresh the webpage, security issues aint high, cause this project probably aint gonna go on the web. I got the idea from the dynamic searching on google, so i guess such technology is possible some how.
View 2 Replies View Relatedyou can see the sample here [URL]
click on the map to add a marker then move the pin and the values of latitude and longitude fill the textboxes
i use javascript to add the values of textboxes into the listboxes but with no luck
you can see the script in that page
I have ONE page which consists of php, html, and javascript, all on the same page. I have 3 different listboxes on a form, their named id's are: "strike", "grapple", and "strength". I have a span tag named id as: "pa". I Have a variable which is constant and named $totalValue and its vale is: 30, I have another variable named: $availableValue which will get its initial value from $totalValue. What I want to do is this, a user will choose his/her first list box. When the uses clicks the arrow on the listbox it drops down filled with values to choose from, these values come from the $availableValue variable and should be displayed as: 1,2,3,4,5,etc,etc,etc, after the user makes their selection the value of $availableValue is decreased by the amount of the user's selected choice and the value of the $availableValue is displayed on the html part of the page in a span tag.
The user will then choose his/her second listbox, upon clicking that arrow the listbox drops down displaying the REMAINING values from $availableValue variable and displays them as: 1,2,3,etc,etc,etc, after the user makes their selection the value of $availableValue is decreased by the amount of the user's selected choice and the value of the $availableValue is displayed on the html part of the page in a span tag. The user will then choose the last listbox, and upon clicking its arrow the list drops down with the LAST REMAINING values from $availableValue and will be displayed as: 1,2,etc,etc, after the user makes their selection the value of $availableValue is decreased by the amount of the user's selected choice and the value of the $availableValue is displayed on the html part of the page in a span tag.
The user should be able to choose which ever listbox he/she wants as their first listbox. So for argument's sake lets say the user chooses listbox "grapple" first, but of course the user could have chosen any of the 3 listboxes first, but he/she choose "grapple" first. The "grapple" listbox should fill with values 1 to 30, ex: 1,2,3,4,up to 30, the user selects value 5 from "grapple", the $availableValue variable will decrease by 5 and the value of $availableValue is displayed in a span tag. The user then chooses listbox "strength", its values should be filled and displayed with values from 1 to 25, the user selects 8 from "strength", the $availableValue variable decreases by 8 and the value of $availableValue is displayed in a span tag. Finally the user selects listbox "stamina", it listbox displays the values from 1 to 17, the user selects 17 from "stamina" and the $availableValue variable decreases by 17 and the value of $availableValue is displayed in a span tag. All this should happen BEFORE I submit the form via php code.
The code below, including the html, is ALL on one page named: createfighter.php
<?php
$totalValue = 30;
$availableValue = $totalValue;
$action = $_REQUEST['action'];
$strike = $_POST['strike'];
$grapple = $_POST['grapple'];
$strength = $_POST['strength'];
?> .....
I have been trawling everywhere, I cannot find a solution anywhere for the following:
I need a webpage with two list boxes and a text box, I want the two listboxes to be dynamic/cascading (the second dependant upon the choice in the first).
And the textbox dependant upon the selection from the second listbox.
This data has to come from a XML file stored on the local PC or Network drive.
Most importantly I do not want the user of the page to be prompted with the activeX warning.
The PC's are secure so I cannot tweak the reg, it gotta work completely with XML, XSL, Javascript etc only Can this be done if so please can someone post a simple example.
I have two drop-down listboxes on a page. One listbox is visible and named sParent the other is suppose to be hidden and is named sChild. There are only 2 option values in the sParent listbox and they are vParent and vChild. If the user chooses the vChild option from the sParent listbox, than the second listbox named sChild is suppose to become visible, but if the users chooses any other option value or no option value at all from the sParent listbox the sChild listbox is to remain hidden. Below is the jquery code I am using, and below that is my html code:
View 2 Replies View Related