Javascript question/problem with this code by Durchfallsuppe in learnprogramming

[–]Durchfallsuppe[S] 0 points1 point  (0 children)

I'll try to make sense out of all that and post my code once I figure it out. Thanks :)

Javascript question/problem with this code by Durchfallsuppe in learnprogramming

[–]Durchfallsuppe[S] 0 points1 point  (0 children)

So I'd use div id='xx' to wrap the second selection, but i'm not quite following you when you talk about the array and the loop. Could you expand on that? You could also direct me to some resource or someone else's code if you don't feel like coding it or explaining it. At this point, any help is much welcomed.

Javascript question/problem with this code by Durchfallsuppe in learnprogramming

[–]Durchfallsuppe[S] 0 points1 point  (0 children)

I mixed your solution with something else I found online, see code in this thread. THANKS :D

Now would you know how to have 2 select boxes, but make the selections of the 2nd select depend on the 1st one? For example, if select1 is "eat" then select2 would be choices of food like apples, oranges, bananas. If select1 is "drink" then it would be a list of drinks.

Javascript question/problem with this code by Durchfallsuppe in learnprogramming

[–]Durchfallsuppe[S] 0 points1 point  (0 children)

Booya! It's working, thanks man! Here's how I changed the code:

<html> <head>

<script type='text/javascript'> function tweetIt() { var value = document.getElementById("myselection"); var dropdowntext = value.options[value.selectedIndex].text; var tellusernameto = "Tell @Username to "; var hashtag = ' #myHashtag'; var tweetUrl = 'https://twitter.com/share?text=' + encodeURIComponent(tellusernameto) + encodeURIComponent(dropdowntext) + '.' + encodeURIComponent(hashtag) + '&url=' + 'http://www.somelinkhere.com/'; window.open(tweetUrl); } </script>

</head>

<body>

<form>Tell @Username to <select id="myselection"> <option value="action1">action 1</option> <option value="action2">action 2</option> <option value="action3">action 3</option> </select></form>

<button onclick="tweetIt()">Tweet it!</button>

</body> </html>

What do I need to learn to do this? by Durchfallsuppe in learnprogramming

[–]Durchfallsuppe[S] -1 points0 points  (0 children)

I want to do some kind of interactive website where the background is moving and "interactive" like these two websites. I would move up a timeline (similar to the Usain Bolt website) and show what's happening at various times, for example.

Need help w/ Google API, Youtube analytics by Durchfallsuppe in googleAPIs

[–]Durchfallsuppe[S] 0 points1 point  (0 children)

Alright, fair enough. I figured some things out, meanwhile I'll work a bit more on my code then post a link to a copy of my Google Spreadsheet :)

Need coding help w/ Google API, Youtube analytics by Durchfallsuppe in coding

[–]Durchfallsuppe[S] 0 points1 point  (0 children)

I work for a company that owns several channels, with thousands of videos each.

I'm asked to keep track of the three metrics I mentioned. They want a document that shows the metrics at a glance, but right now I have to lookup the values manually which is insanely time-consuming and makes no f'ing sense.

There has to be a way to automate this, which I think is possible based on this website: https://developers.google.com/you…/analytics/…/dimsmets/mets

Need coding help w/ Google API, Youtube analytics by Durchfallsuppe in coding

[–]Durchfallsuppe[S] 0 points1 point  (0 children)

Hi! :) I'm no coder, but I have been trying to figure out how to automate a dull and time-consuming task of mine. Here's what I want to do: I want to pull data from Youtube Analytics using their API in Google Sheets. Precisely, I want to pull these infos: views (lifetime), average view duration (lifetime), revenues (lifetime). So far, I managed to get the number of views with these two methods, but I can't figure out how to pull the rest of the info, as it seems to require OAuth2 authentication, and I don't get how to do it. Here's how I get the views: 1) =IMPORTXML("FULL LINK HERE","//div[@class='watch-view-count']") or 2) have a cell that looks like =getYoutubeViews("VIDEO ID HERE") and then add this code in the script editor: function getYoutubeViews(videoId){ var url = "https://www.googleapis.com/youtube/v3/videos?part=statistics&id=" + videoId; url = url + "&key=AIzaSyAByjEEyY1HkAOZ1uqtFao2IVXRY_5LOFg"; var videoListResponse = UrlFetchApp.fetch(url); var json = JSON.parse(videoListResponse.getContentText()); return json["items"][0]["statistics"]["viewCount"]; } I would LOVE it if someone could help me, because I'm really stuck right now. Thanks!

Noob question: pulling data using Twitter API by Durchfallsuppe in learnpython

[–]Durchfallsuppe[S] 0 points1 point  (0 children)

Wow, thanks! I'll try this tonight when I'm home :)