Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 17 09:32
    User @bjorno43 unbanned @linkin-park
  • Jun 20 21:19
    @bjorno43 banned @shenerd140
  • Apr 25 17:13
    @mstellaluna banned @cmal
  • Jan 08 22:05
    @mstellaluna banned @dertiuss323
  • Nov 07 2018 04:42
    User @texas2010 unbanned @ows-ali
  • Nov 02 2018 16:25
    @texas2010 banned @ows-ali
  • Oct 12 2018 05:50
    @bjorno43 banned @NACH74
  • Oct 05 2018 23:02
    @mstellaluna banned @JomoPipi
  • Sep 16 2018 12:21
    @bjorno43 banned @yash-kedia
  • Sep 16 2018 12:16
    @bjorno43 banned @vnikifirov
  • Sep 05 2018 08:12
    User @bjorno43 unbanned @androuino
  • Sep 05 2018 07:38
    @bjorno43 banned @androuino
  • Aug 23 2018 16:57
    User @bjorno43 unbanned @rahuldkjain
  • Aug 23 2018 16:23
    @bjorno43 banned @rahuldkjain
  • Jul 29 2018 14:13
    User @bjorno43 unbanned @jkyereh
  • Jul 29 2018 01:00
    @bjorno43 banned @jkyereh
  • Jul 10 2018 22:09
    @bjorno43 banned @manafn
  • Jul 06 2018 15:20
    @texas2010 banned @imlegend19
  • Jul 03 2018 12:28
    @bjorno43 banned @vbvmatta
  • Jun 29 2018 13:54
    @bjorno43 banned @OGTechnoBoy
CamperBot
@camperbot
6thsen sends brownie points to @mot01 :sparkles: :thumbsup: :sparkles:
:cookie: 472 | @mot01 |http://www.freecodecamp.com/mot01
Tom
@moT01
oh, i got one stream on this refresh @6thSen
JD Tadlock
@jdtdesigns
@6thSen You can take on the more challenging solution and use the twitch api instead. It doesn't go down. ;)
chiphip
@chiphip
How can I force the callback function to get the data first from the json....I am having trouble with the weather app project
JD Tadlock
@jdtdesigns
sounds like you need to follow the asynchronous pattern @chiphip
the data doesn't come instantly, so you need to make sure you have it before running other code
you can do this in a few ways
call a function from inside the getJSON callback
or use jQuery .then() after the getJSON
chiphip
@chiphip
@jdtdesigns Yea that's what I figured, do you have any example I can look at?
JD Tadlock
@jdtdesigns
6thSen
@6thSen
@jdtdesigns didn't want to sign up for a twitch account unless I absolutely had to...now I absolutely have to :D
aenila
@aenila
I'm working on the local weather app and trying to make a button that allows the user to search weather by zip code. But for some reason even though I confirmed the button fires the .click() function with an alert('Button Fired'); command, the console.log command doesn't register and it doesn't call the function it's supposed to. Can somebody take a look and help me figure out what's wrong, please?
http://codepen.io/aenila/pen/EZmYPL
JD Tadlock
@jdtdesigns
@aenila Open the browser console (ctrl shift j)
you'll see your errors ;)
Clyde Lobo
@oppiniated
@aenila js is case sensitive zip and Zip are not the same. You declare Zip in var Zip = document.getElementById('zipCode').value; and use zip in the api call
aenila
@aenila
That made it pretty obvious JD. Thank you. And yes, I just found that myself Clyde. Thank you as well. How come that info doesn't show up in the web console though, just out of curiosity?
chiphip
@chiphip
@jdtdesigns The example you show does not have a .then or a function call inside the json function
or am I not seeing right?
JD Tadlock
@jdtdesigns
@chiphip navigator is async as well
so you can see inside the getlocation just how you do the same thing inside getJSON
@aenila Codepen filters out some data
the only way to see all the errors is to use the browser's console
chiphip
@chiphip
@jdtdesigns so you mean inside getLocation() you are calling showWeather()?
JD Tadlock
@jdtdesigns
yes
chiphip
@chiphip
Okay, let me give this a try. Thanks @jdtdesigns
CamperBot
@camperbot
chiphip sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 886 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
JD Tadlock
@jdtdesigns
@chiphip welcome
Icah Banton
@remdata

hello. help. The following code is producing a "Uncaught SyntaxError: Invalid or unexpected token" in chrome. What am I doing wrong: <html>

<head>

<title>Event Test</title>
</head>

<body>

<h1>Event Test</h1>
<p>
<button onClick=alert("Aha! An Event!")>Click this to test an event handler</button>
</p>
</body>
</html>

JD Tadlock
@jdtdesigns
@chiphip I added a little code to show you how .then() works ;) https://jsbin.com/wikeked/edit?js,output
chiphip
@chiphip
@jdtdesigns BTW, dude your Weather App is hot as hell. Great job :-) I am really jealous.
JD Tadlock
@jdtdesigns
@remdata the alert needs to be inside quotes
@chiphip The one on jsbin? lol
chiphip
@chiphip
no....the one codepen, the green one
JD Tadlock
@jdtdesigns
ah, thanks :) @chiphip
CamperBot
@camperbot
:cookie: 265 | @chiphip |http://www.freecodecamp.com/chiphip
jdtdesigns sends brownie points to @chiphip :sparkles: :thumbsup: :sparkles:
Icah Banton
@remdata
@jdtdesigns . With the quotes I get the following error: alertTest.html:9 Uncaught SyntaxError: Unexpected token }
chiphip
@chiphip
How long did you work on that project?
JD Tadlock
@jdtdesigns
hmm, probably 2 hours or so
@remdata Post your pen
Patrick Black
@Mortiferr
http://codepen.io/Mortiferr/pen/oBZJzp?editors=1010
My document.write for the celcius and Fahrenheit isn't appearing
Icah Banton
@remdata

@jdtdesigns . It's not a pen but here is the code: <html>

<head>

<title>Event Test</title>
</head>

<body>

<h1>Event Test</h1>
<p>
<button onClick="alert("Aha! An Event!")">Click this to test an event handler</button>
</p>
</body>
</html>

Patrick Black
@Mortiferr
I added an if statement to make sure it wouldn't print until its ready but the function still isn;t calling correctly
Eric Chung
@chungeric
Hi guys, I'm trying to build the random quote generator using an external API, but i'm having trouble getting the data
$(document).ready( function(){
  $.getJSON("http://api.forismatic.com/api/1.0/?method=getQuote&format=json&lang=en", function(json){
    $(".quote").html(json.quoteText);
  });
});
This is what i've got for the javascript, and I have a div with class quote but it's not changing. Any help? Thanks!
sennator
@sennator2
@chungeric i would suggest that you first take a look at this video https://www.youtube.com/watch?v=5xeDQ1-ZfcQ