Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript code works in jsfiddle but not on browser

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #191656
    erenalkan
    Participant

    <script src=”https://apis.google.com/js/platform.js”></script&gt;

    <script>
    function onYtEvent(payload) {
    if (payload.eventType == ‘subscribe’) {
    // Add code to handle subscribe event.
    } else if (payload.eventType == ‘unsubscribe’) {
    // Add code to handle unsubscribe event.
    }
    if (window.console) { // for debugging only
    window.console.log(‘YT event: ‘, payload);
    }
    }
    </script>

    <.div class=”g-ytsubscribe” data-channel=”GoogleDevelopers” data-layout=”default” data-count=”hidden” data-onytevent=”onYtEvent”><./div>

    I’m new in this forum, and I don’t know how to send code for a proper view but here’s the problem, it doesn’t work on my dreamweaver html page..

    :(

    #191657
    Paulie_D
    Member

    Do you mean it doesn’t work in DW’s built in browser or doesn’t work in an actual browser?

    If the former, ignore it…if the latter, that’s another issue.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.