
November 5th, 2012, 09:20 AM
|
|
Contributing User
|
|
Join Date: Dec 2007
Posts: 46
Time spent in forums: 9 h 14 m 24 sec
Reputation Power: 6
|
|
|
Chained Select Assistance
Hi
I managed to get the tutorial from the below link to work.
http://www.blueicestudios.com/chained-select-boxes-using-php-mysql-ajax/comment-page-11/#comment-34199
I would love to know how to edit this script so as to get the first dropdown to populate an already existing dropdown without the loader image and without the hiding of any dropdowns.
I would assume that only this section needs editing:
Javascript Code:
Original
- Javascript Code |
|
|
|
$(document).ready(function() { $('#wait_1').hide(); $('#drop_1').change(function() { $('#wait_1').show(); $('#result_1').hide(); $.get("func.php", { func: "drop_1", drop_var: $('#drop_1').val() }, function(response) { $('#result_1').fadeOut(); setTimeout("finishAjax('result_1', '"+escape(response)+"')", 400); }); return false; }); }); function finishAjax(id, response) { $('#wait_1').hide(); $('#'+id).html(unescape(response)); $('#'+id).fadeIn(); }
Your assistance is greatly appreciated
Last edited by Winters : November 7th, 2012 at 02:41 AM.
Reason: Added some formatting.
|