Forum Replies Created

Viewing 15 replies - 1 through 15 (of 36 total)
  • Thread Starter mames40

    (@mames40)

    Hi,
    I tried replacing $ with jQuery. I get the same error. I tried logging into jfiddle to see if I could contact the author but there was no way to get a hold of him. It’s a code example from Spotify Web API HTML widgets. I’m surprised they would be writing conflict code as an example to use for the API. At a loss. :(.

    Thread Starter mames40

    (@mames40)

    Hi,
    The only place where $ is being used by the author of this script is in the ajax call see below. Not sure what I would replace it with?

    var templateSource = document.getElementById('results-template').innerHTML,
        template = Handlebars.compile(templateSource),
        resultsPlaceholder = document.getElementById('results'),
        playingCssClass = 'playing',
        audioObject = null;
    
    var fetchTracks = function (albumId, callback) {
        $.ajax({
            url: 'https://api.spotify.com/v1/albums/' + albumId,
            success: function (response) {
                callback(response);
            }
        });
    };
    
    var searchAlbums = function (query) {
        $.ajax({
            url: 'https://api.spotify.com/v1/search',
            data: {
                q: 'artist:' + query,
                type: 'album',
                market: "US"
            },
            success: function (response) {
                resultsPlaceholder.innerHTML = template(response);
            }
        });
    };
    
    results.addEventListener('click', function(e) {
        var target = e.target;
        if (target !== null && target.classList.contains('cover')) {
            if (target.classList.contains(playingCssClass)) {
                audioObject.pause();
            } else {
                if (audioObject) {
                    audioObject.pause();
                }
                fetchTracks(target.getAttribute('data-album-id'), function(data) {
                    audioObject = new Audio(data.tracks.items[0].preview_url);
                    audioObject.play();
                    target.classList.add(playingCssClass);
                    audioObject.addEventListener('ended', function() {
                        target.classList.remove(playingCssClass);
                    });
                    audioObject.addEventListener('pause', function() {
                        target.classList.remove(playingCssClass);
                   });
                });
            }
        }
    });
    
    searchAlbums('Leonard Cohen');

    Thanks for your helo.

    Thread Starter mames40

    (@mames40)

    I moved the files to marksteinway and am getting

    /*! jQuery Migrate v1.4.0 | (c) jQuery Foundation and other contributors | jquery.org/license */
    "undefined"==typeof jQuery.migrateMute&&

    How do I get jquery to load successfully?

    Thread Starter mames40

    (@mames40)

    Yes marksteinway is what is activated. I did a database import from the live site so that is how it was configured but most of the files that are being used on in markandersonpianist like the home page box and the sidebar. I’ll move the javascript to marksteinway and see if that works. Thanks,

    Thread Starter mames40

    (@mames40)

    Interesting. This is an old site that I am updating. It’s not mine. Is it possible to have two themes being used? I have been making changes to the homepage and sidebar by placing files in markandersonpianist and it has been updating the site.

    Thread Starter mames40

    (@mames40)

    Hi Kel,
    markandersonpianist.com uses the theme markandersonpianist not marksteinway. The files are located in the js folder inside the theme markandersonpianist. Any other suggestions? I’m really stumped. Thanks for your help.

    Thread Starter mames40

    (@mames40)

    Thank you for all of your help!

    Thread Starter mames40

    (@mames40)

    I received the email to my email address in the destination email but not the confirmation email from the email address entered into the form. There is a place to add the email field in the confirmation section of email addresses but the form won’t let me add a fieldname there. How do I tell the form to send the confirmation email to the field name in the form?

    Thread Starter mames40

    (@mames40)

    Also,
    I am testing the form and emails being sent. I have the option of send email before paying with paypal so I can receive the email without paying paypal. The email is not being sent. I have my destination email inserted in the destination email, from is [email protected] (an email account I created on the webhost server) and my email message is the following:

    The following contact message has been sent:
    
    <%INFO%>

    Not sure why I am not getting the email.

    Thanks!

    Thread Starter mames40

    (@mames40)

    Thank you!

    How do I align left labels of only certain number fields (not all of them). I saw the align options in the form settings but I don’t want to align all of them left just two number fields.

    Thanks so much!

    Thread Starter mames40

    (@mames40)

    Hi,
    I found an explanation of how to add a table structure but I am still confused. I don’t understand how to get the fields in the column to make up a row. It said to add a classname column2 to align two fields but wouldn’t you put field1 in column1 and field2 in column2? I don’t understand.

    Thread Starter mames40

    (@mames40)

    I figured out how to change it in my stylesheet style.css

    div#sub-header {
       background-color:rgb(153,0,0)
    }
    Thread Starter mames40

    (@mames40)

    Thanks so much for your help!
    Margaret

    Thread Starter mames40

    (@mames40)

    Hi,
    That fixed it. :). Sorry I forgot about the total field. Is there a way to add the “$” to the total since it is a price total?

    Thanks so much,
    Margaret

    Thread Starter mames40

    (@mames40)

    Hi,
    For the number field symbol for decimal I have tried only the “.” with and without the thousands grouping symbol 0,000,000. I still get 1300.005 :(.

Viewing 15 replies - 1 through 15 (of 36 total)