Torna al Thread
<html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#sel_continenti').change(function(){
var cont = $('#sel_continenti').attr('value');
$.post("selection.php", {id_cont:cont}, function(data){
$("#sel_nazioni").empty();
//$("div#result").empty();
$("div#nazioni").empty();
$("div#result").append("prova2<br />");
//$("div#result").append(document.createTextNode("prova"));
$("#sel_nazioni").prepend(data);
$("div#nazioni").prepend(data);
});
});
$('#sel_nazioni').change(function(){
var id_naz = $('#sel_nazioni').attr('value');
$.post("result.php", {id:id_naz}, function(data){
$("div#result").empty();
$("div#result").append("prova3<br />");
//$("div#result").prepend(data);
});
});
});
</script>
</head>
<body>
<div id="continenti">
<?php
include_once 'option.class.php';
$obj = new Option();
$obj->ShowContinenti();
?>
</div>
<div id="nazioni">
<!--Seleziona una nazione:<br>
<select id="sel_nazioni" name="sel_nazioni"><option value="no">Scegli...</option>
</select>-->
</div>
<div id="result">
prova1<br />
</div>
</body>
</html>