...

View Full Version : jQuery Multiple select issue



danny5uk
01-14-2011, 11:09 PM
Hello, I have done the following:


<script type="text/javascript">
$(document).ready(function(){
$("#chosenTour").change(onSelectChange);
});


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";
}
$("#output").html(output);
}
</script>
<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>
</select>

<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! ;)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum