Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript">
- function update_count(field_type) // OnChange event of dropdown in form
- {
- var skill=field_type.options[field_type.selectedIndex].value; // Value of selected item
- if (skill != '') { // Error check
- var url = '../modules/WWCQE/skill.php'; // Module call to get data
- $.ajax({
- type: "POST",
- url: url,
- data: "skill_level="+skill, // Passed in variable
- dataType: "json", // Html, data or json
- success: function(data){
- $.each(data, function (id, count) {
- $("#"+id).html(count);
- }
- },
- error: function(xhr, ajaxOptions, thrownError){
- alert(xhr.status);
- alert(thrownError);
- }
- });
- }
- }
- </script>
Add Comment
Please, Sign In to add comment