Side navigation
Ticket #6010: ad-product-1.0.js
File ad-product-1.0.js, 0.8 KB (added by gtraxx, February 02, 2010 02:29PM UTC)
$(function() {
$.getJSON("/admin/dashboard/catalog/json/getidclc="+ $('select#idclc').val(),function(j){
var options = '<option value="0">Aucune sous-catégorie</option>';
for (var i = 0; i < j.length; i++) {
options += '<option value="' + j[i].optionValue + '">' + j[i].optionDisplay + '</option>';
}
$("select#idcls").html(options);
});
$("select#idclc").change(function(){
$.getJSON("/admin/dashboard/catalog/json/getidclc="+ $(this).val(),function(j){
var options = '<option value="0">Aucune sous-catégorie</option>';
for (var i = 0; i < j.length; i++) {
options += '<option value="' + j[i].optionValue + '">' + j[i].optionDisplay + '</option>';
}
$("select#idcls").html(options);
});
});
});
Download in other formats:
Original Format
File ad-product-1.0.js, 0.8 KB (added by gtraxx, February 02, 2010 02:29PM UTC)
$(function() {
$.getJSON("/admin/dashboard/catalog/json/getidclc="+ $('select#idclc').val(),function(j){
var options = '<option value="0">Aucune sous-catégorie</option>';
for (var i = 0; i < j.length; i++) {
options += '<option value="' + j[i].optionValue + '">' + j[i].optionDisplay + '</option>';
}
$("select#idcls").html(options);
});
$("select#idclc").change(function(){
$.getJSON("/admin/dashboard/catalog/json/getidclc="+ $(this).val(),function(j){
var options = '<option value="0">Aucune sous-catégorie</option>';
for (var i = 0; i < j.length; i++) {
options += '<option value="' + j[i].optionValue + '">' + j[i].optionDisplay + '</option>';
}
$("select#idcls").html(options);
});
});
});