Plugin Directory

Changeset 678603


Ignore:
Timestamp:
03/09/2013 08:20:45 AM (13 years ago)
Author:
yourlocalwebmaster
Message:

-- Fixed absolute JS path. --

File:
1 edited

Legend:

Unmodified
Added
Removed
  • simple-stock-quotes/trunk/main.js

    r678578 r678603  
    1 $(document).ready(function () {                 
    2                 $("#ylwm_txtName").keyup(function (event) {
    3                     $.ajax({
     1jQuery(document).ready(function () {                   
     2
     3                jQuery("#ylwm_txtName").keyup(function (event) {
     4
     5                    jQuery.ajax({
     6
    47                        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
    611                        dataType: "text",
    7                         data: {'symbol': $('#ylwm_txtName').val()},
     12
     13                        data: {'symbol': jQuery('#ylwm_txtName').val()},
     14
    815                        success: processSuccess,
     16
    917                        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
    1223        });
     24
    1325   
     26
    1427    });
     28
    1529});
     30
    1631function processSuccess(data, status, req) {
     32
    1733    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
    2141        '</div>'
     42
    2243    );
     44
    2345}
     46
    2447function processError(data, status, req) {
     48
    2549//  alert(req.responseText + " " + status);
     50
    2651alert('SOAP must be enabled on your server in order for this plugin to work!');
     52
    2753}
Note: See TracChangeset for help on using the changeset viewer.