Changeset 678603
- Timestamp:
- 03/09/2013 08:20:45 AM (13 years ago)
- File:
-
- 1 edited
-
simple-stock-quotes/trunk/main.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
simple-stock-quotes/trunk/main.js
r678578 r678603 1 $(document).ready(function () { 2 $("#ylwm_txtName").keyup(function (event) { 3 $.ajax({ 1 jQuery(document).ready(function () { 2 3 jQuery("#ylwm_txtName").keyup(function (event) { 4 5 jQuery.ajax({ 6 4 7 type: "POST", 5 url: location.protocol + "//" + location.host + location.pathname + "wp-content/plugins/ylwm-stock-quotes/proxy.php", 8 9 url: location.protocol + "//" + location.host + "/wp-content/plugins/simple-stock-quotes/proxy.php", 10 6 11 dataType: "text", 7 data: {'symbol': $('#ylwm_txtName').val()}, 12 13 data: {'symbol': jQuery('#ylwm_txtName').val()}, 14 8 15 success: processSuccess, 16 9 17 error: processError, 10 beforeSend: function(){$('#ylwm_loader').show()}, 11 complete: function(){$('#ylwm_loader').hide()} 18 19 beforeSend: function(){jQuery('#ylwm_loader').show()}, 20 21 complete: function(){jQuery('#ylwm_loader').hide()} 22 12 23 }); 24 13 25 26 14 27 }); 28 15 29 }); 30 16 31 function processSuccess(data, status, req) { 32 17 33 if (status == "success") 18 $("#ylwm_response").html( 19 '<div class="ylwm_results"><div class="ylwm_results_name">'+$(data).find("Name").text() + '</div>' + 20 '<div class="ylwm_results_current">'+$(data).find("Last").text() + ' <small class="ylwm_change_val">' +$(data).find("Change").text() + '</small></div>' + 34 35 jQuery("#ylwm_response").html( 36 37 '<div class="ylwm_results"><div class="ylwm_results_name">'+jQuery(data).find("Name").text() + '</div>' + 38 39 '<div class="ylwm_results_current">'+jQuery(data).find("Last").text() + ' <small class="ylwm_change_val">' +jQuery(data).find("Change").text() + '</small></div>' + 40 21 41 '</div>' 42 22 43 ); 44 23 45 } 46 24 47 function processError(data, status, req) { 48 25 49 // alert(req.responseText + " " + status); 50 26 51 alert('SOAP must be enabled on your server in order for this plugin to work!'); 52 27 53 }
Note: See TracChangeset
for help on using the changeset viewer.