View Full Version : jQuery Multiple select issue

01-15-2011, 12:09 AM
Hello, I have done the following:

<script type="text/javascript">

function onSelectChange(){
var selected = $("#chosenTour option:selected");
var output = "";
if(selected.val() != 0){
output = "<ul><li><h3>" + selected.text() + "<\/h3> <div class=\"output_date\">Date: "+ $("#datepicker").val() + "<br \/>Time: "+ $("#time").val() + "<\/div><\/li><\/ul> \n";
<label> Tours: </label>
<select id="chosenTour">
<option value="0">One hour tour</option>
<option value="1">Two hour tour</option>
<option value="2">Three hour tour</option>
<option value="3">Custom tour</option>

<div id="output"></div>

The user can select 1 tour, however Id like them to beable to change the time and date to create a new tour underneath the one they already created.

Id also like to be able to remove a tour by clicking on it, without loosing the rest of them. I realise this means storing them in an array or something similar but I dont know about to go about it in Jquery.

Also posting the tours and assosciated variables (date and time) into PHP is needed. Id probably be using $_GET.

Many thanks in advance! ;)