These are chat archives for FreeCodeCamp/HelpFrontEnd

10th
Apr 2017
Melissa Knapp
@MelEKn
Apr 10 2017 00:00
Anybody?
Pagnito
@Pagnito
Apr 10 2017 00:01
@MelEKn try putting ur url variable inside document rdy function
@MelEKn why are u declaring vsearch hi?
@MelEKn sry, i dont usally do alot helping ppl, tryin to see what ur doing on the white background without color diffirneces in text, rly gotta focus
Pagnito
@Pagnito
Apr 10 2017 00:07
give us a link, itll be much easier to see in the codepen
@Pagnito I'm just declaring it to be "Hi" so that I can check if the $("#testSearchText").html(vsearch); line is working or not; if it were blank, then I'd have no way of knowing if that line were part of the problem or not.
Pagnito
@Pagnito
Apr 10 2017 00:16
is there any way to filter api to comeback in teh same order i requested it
@MelEKn hold on ima look at it
Mohamed Derhalli
@derhallim
Apr 10 2017 00:18
@MelEKn what's the problem
Pagnito
@Pagnito
Apr 10 2017 00:18
so what do u want $("#testSearchText").html(vsearch);
to do
Mohamed Derhalli
@derhallim
Apr 10 2017 00:18
ur adding default value as Hi, then ur getting the value of text box which is empty
Melissa Knapp
@MelEKn
Apr 10 2017 00:19
@derhallim Yes, but it never gets the value of the text box.
@derhallim Even if I click the button, it still says "Hi" at the end.
Pagnito
@Pagnito
Apr 10 2017 00:20
are u trying to give vsearch the value of the input?
Mohamed Derhalli
@derhallim
Apr 10 2017 00:20
var apiURL = "https://en.wikipedia.org/w/api.php" 

$(document).ready(function() {

  var vsearch = "Hi";
  $("#wikiSearch").on("click", function(){
    alert(vsearch);
 vsearch = $("#searchText").val();
    alert(vsearch)

   });

  //$("#testSearchText").html(vsearch);

  });
Melissa Knapp
@MelEKn
Apr 10 2017 00:20
@derhallim Also, the idea is to get the text box when it's not empty, I've been entering "Testing" before clicking the button, but clicking the button doesn't trigger the function for some reason. I'm trying to figure out why clicking the button doesn't trigger the function
@Pagnito Yes
Pagnito
@Pagnito
Apr 10 2017 00:20
@MelEKn well u have to assign it with = in JS
@Pagnito not with html
Mohamed Derhalli
@derhallim
Apr 10 2017 00:21
basically u need this:
var apiURL = "https://en.wikipedia.org/w/api.php" 

$(document).ready(function() {

  var vsearch = "Hi";
  $("#wikiSearch").on("click", function(){
    alert(vsearch);
 vsearch = $("#searchText").val();
    if(vsearch){ 
      //write your code here to get webservice
    }

   });

  //$("#testSearchText").html(vsearch);

  });
Melissa Knapp
@MelEKn
Apr 10 2017 00:21

@pagnito Yes, that's what the

vsearch = $("#searchText").val();

line is

Pagnito
@Pagnito
Apr 10 2017 00:21
and ur assignment only happens when u type Hi
oh yea ok i got confused wit the last line
Melissa Knapp
@MelEKn
Apr 10 2017 00:22
@derhallim Ok giving me a sec trying that...
Mohamed Derhalli
@derhallim
Apr 10 2017 00:22
just get the value of the textbox, and with if(textboxVal) , u check if it's filled or not
u translate what u say into code: get me val of text box, now is it filled? if yes get web service
?
Melissa Knapp
@MelEKn
Apr 10 2017 00:24
@derhallim Ok, wait, I'm having some trouble transferring it over without losing any of what I have, but can you tell me why the function doesn't work in my code?
Mohamed Derhalli
@derhallim
Apr 10 2017 00:24
it works in ur code
but u r not having anything to show the textbox val
Melissa Knapp
@MelEKn
Apr 10 2017 00:25
@derhallim Oh... why doesn't $("#testSearchText").html(vsearch); work?
Mohamed Derhalli
@derhallim
Apr 10 2017 00:25

this

vsearch = $("#searchText").val();

is going to get the val of the textbox

it does
Melissa Knapp
@MelEKn
Apr 10 2017 00:26
Yes, but why doesn't $("#testSearchText").html(vsearch); write the value of vsearch into the last part of the page?
Mohamed Derhalli
@derhallim
Apr 10 2017 00:26

$(document).ready(function() {

  var vsearch = "Hi";
  $("#wikiSearch").on("click", function(){
    alert(vsearch);
    vsearch = $("#searchText").val();
    if(vsearch){ 

      $("#testSearchText").html(vsearch);
      //write your code here to get webservice
    }

   });

  //$("#testSearchText").html(vsearch);

  });
Gulsvi
@gulsvi
Apr 10 2017 00:27

@lhoward465 It's:

$('#selectorId').on('click', myFunction);

function myFunction1() {
  console.log('hello');
}

If you need to pass arguments to the function, do:

$('#selectorId').on('click', function() {
  myFunction(arg1, arg2, etc);
});

function myFunction1() {
  console.log('hello');
}
Mohamed Derhalli
@derhallim
Apr 10 2017 00:27
delete the alert, to clean it up
Melissa Knapp
@MelEKn
Apr 10 2017 00:28
@derhallim Thank you... I want to know why it doesn't write the new value of vsearch to #testSearchText, though... if it doesn't work and as far as I can tell it should, then there's something I don't understand, and if I just use your code without figuring out why, I still won't understand it
CamperBot
@camperbot
Apr 10 2017 00:28
melekn sends brownie points to @derhallim :sparkles: :thumbsup: :sparkles:
:cookie: 164 | @derhallim |http://www.freecodecamp.com/derhallim
Mohamed Derhalli
@derhallim
Apr 10 2017 00:29
@MelEKn it writes it, see this code:
var apiURL = "https://en.wikipedia.org/w/api.php" 
$(document).ready(function() {

  var vsearch = "Hi";
  $("#wikiSearch").on("click", function(){
    alert(vsearch);
    vsearch = $("#searchText").val();
    if(vsearch){ 

      $("#testSearchText").html(vsearch);
      //write your code here to get webservice
    }

   });

  //$("#testSearchText").html(vsearch);

  });
u need to click on the button after filling the text
Gulsvi
@gulsvi
Apr 10 2017 00:30
@aliahmad-code I just read the MDN documents and the jQuery documents kind of like a dictionary. One method at a time and practiced them in codepen until I figured out how they work. I also read the bootstrap css file from top to bottom to get an idea of classes available and how they work.
Melissa Knapp
@MelEKn
Apr 10 2017 00:30
@derhallim With your code, yes... not with mine. :P I guess I should keep going though, thank you for your help!
CamperBot
@camperbot
Apr 10 2017 00:30
melekn sends brownie points to @derhallim :sparkles: :thumbsup: :sparkles:
:warning: melekn already gave derhallim points
Mohamed Derhalli
@derhallim
Apr 10 2017 00:30
:'( post ur code one more time @MelEKn
let's see what u wrote
u should not keep going without understanding, u won't learn
@derhallim OK got it working now, thanks
CamperBot
@camperbot
Apr 10 2017 00:32
melekn sends brownie points to @derhallim :sparkles: :thumbsup: :sparkles:
:warning: melekn already gave derhallim points
Mohamed Derhalli
@derhallim
Apr 10 2017 00:32
are you typing: Hi in the text?
great!
Melissa Knapp
@MelEKn
Apr 10 2017 00:32
@derhallim haha, no, I am not that dumb
Mohamed Derhalli
@derhallim
Apr 10 2017 00:33
:'(
@SkyCoder01 man, do u really read through jQuery docs?
Gulsvi
@gulsvi
Apr 10 2017 00:34
lol, yes @derhallim Every single method listed here: http://api.jquery.com/
I copy/pasted the practice code into a pen and changed it around until I figured it out. Better than books for me!
<-------- OCD
Moisés Man
@moigithub
Apr 10 2017 00:35
...i will get a brainfart if i do that
Mohamed Derhalli
@derhallim
Apr 10 2017 00:35
that's pretty cool
i only search when i need to
Pagnito
@Pagnito
Apr 10 2017 00:35
is there a way to return the api list of twitch users and reorder them in the same way it is in my array of them, since they comeback in a random order
Gulsvi
@gulsvi
Apr 10 2017 00:35
It's how I learned to write batch files. Type in "help" and try every single command... lol
Kind of just stuck with me
Mohamed Derhalli
@derhallim
Apr 10 2017 00:36
i bet u program in C and C++, right @SkyCoder01 ?
Gulsvi
@gulsvi
Apr 10 2017 00:36
No, lol, but I do read the back of the shampoo bottle.
Mohamed Derhalli
@derhallim
Apr 10 2017 00:36
hahaha
Gulsvi
@gulsvi
Apr 10 2017 00:36
:)
Mohamed Derhalli
@derhallim
Apr 10 2017 00:36
any kind of documentation
Gulsvi
@gulsvi
Apr 10 2017 00:37
@Pagnito Yes, with promises it can be done. Easier to write your HTML first, then when you getJSON, you can insert the HTML into each user's div/row
Mohamed Derhalli
@derhallim
Apr 10 2017 00:37
@Pagnito i still haven't dealt with twitch api
Gulsvi
@gulsvi
Apr 10 2017 00:37
Writing HTML is synchronous, getJSON is not, if that makes sense
Mohamed Derhalli
@derhallim
Apr 10 2017 00:38
i never used getJSON before dealing with FCC
always $.get
probably because i deal with sharepoint a lot, and it provides u with either json or xml, and u have to specify in the headers, the accept, which type u wanna have back
Gulsvi
@gulsvi
Apr 10 2017 00:39
Isn't that meant for getting DOM elements though?
Mohamed Derhalli
@derhallim
Apr 10 2017 00:39
no, it's the same
with JSON, its just for json
Gulsvi
@gulsvi
Apr 10 2017 00:39
I guess it could parse a web page with JSON, but no JSONP I'm guessing
Mohamed Derhalli
@derhallim
Apr 10 2017 00:39
but what if u wanna contact a web service to get back XML?
Gulsvi
@gulsvi
Apr 10 2017 00:40
I'd use ajax for that
Mohamed Derhalli
@derhallim
Apr 10 2017 00:40
yea
crap, that's what I was referring to :'(
Gulsvi
@gulsvi
Apr 10 2017 00:40
lol :)
Mohamed Derhalli
@derhallim
Apr 10 2017 00:41
forgot to add the ajax there
i was typing the example for u $.ajax({.... } );
yea the get is for getting another html stuff
Gulsvi
@gulsvi
Apr 10 2017 00:42
I wonder how to do it with fetch() though...
Mohamed Derhalli
@derhallim
Apr 10 2017 00:42
i saw an example in fetch
but didn't pay attention as it's still isn't supporting that much
Gulsvi
@gulsvi
Apr 10 2017 00:42
All the modern browsers support it now :)
Mohamed Derhalli
@derhallim
Apr 10 2017 00:42
actually it is
yea
Gulsvi
@gulsvi
Apr 10 2017 00:43
I think they finally caught up
Mohamed Derhalli
@derhallim
Apr 10 2017 00:43
yea, i always validate on caniuse
OMG :O Edge supports it .. :'(
Gulsvi
@gulsvi
Apr 10 2017 00:43
They got the hint, I think. Hearing good things about Edge now.
Pagnito
@Pagnito
Apr 10 2017 00:44
@SkyCoder01 wouldnt that limit my number of users i can have in the app?
Mohamed Derhalli
@derhallim
Apr 10 2017 00:44
did u see their cross browser testing framework?
brb
Gulsvi
@gulsvi
Apr 10 2017 00:45
@Pagnito That approach won't limit beyond the limits you already have
I mean, you probably don't want to loop through an array of thousands of users
Pagnito
@Pagnito
Apr 10 2017 00:45
but i figured i can always push names to the array ?
Gulsvi
@gulsvi
Apr 10 2017 00:45
@derhallim No, I haven't seen their testing framework, will check it out.
Pagnito
@Pagnito
Apr 10 2017 00:46
i wanna make it so there is plus and minus button to add and subtrat users
Gulsvi
@gulsvi
Apr 10 2017 00:46
@Pagnito Then you could use .hide() and .show()
Pagnito
@Pagnito
Apr 10 2017 00:47
not sure what u mean
Gulsvi
@gulsvi
Apr 10 2017 00:47
Are you doing a search feature?
Pagnito
@Pagnito
Apr 10 2017 00:47
yea that too
Gulsvi
@gulsvi
Apr 10 2017 00:47
What do you want to push to an array?
what data, that is
Pagnito
@Pagnito
Apr 10 2017 00:48
new users off of the site
the input basically
which i as i imagine now, would make the call for that user and add it in
Melissa Knapp
@MelEKn
Apr 10 2017 00:49

Heh, ok, I'm stuck again... http://codepen.io/SafiSana/pen/BWXQvw nothing inside of
$.getJSON(apiURLWhole, function(data){
}

seems to be working, and I can't figure out why

Gulsvi
@gulsvi
Apr 10 2017 00:49
If a person enters a user name into a text field and hits enter, then you go to the API and add that user to the page. If they want to remove a user, then use .empty()
No need for an array to store anything
Pagnito
@Pagnito
Apr 10 2017 00:50
oh ya true that
Gulsvi
@gulsvi
Apr 10 2017 00:51
@MelEKn Have you learned about the browser's developer console yet?
Melissa Knapp
@MelEKn
Apr 10 2017 00:52
@SkyCoder01 I have a Mac so other people who were telling me about it didn't know how that workede
Melissa Knapp
@MelEKn
Apr 10 2017 00:52
*worked
Gulsvi
@gulsvi
Apr 10 2017 00:52
@MelEKn Which browser are you using?
Melissa Knapp
@MelEKn
Apr 10 2017 00:52
@SkyCoder01 Chrome
Gulsvi
@gulsvi
Apr 10 2017 00:53
@MelEKn It should be Command + Option + J
Melissa Knapp
@MelEKn
Apr 10 2017 00:53
@SkyCoder01 So, I'm using a Windows keyboard...
@SkyCoder01 AKA I have no idea which keys are equivalent to which
Gulsvi
@gulsvi
Apr 10 2017 00:53
@MelEKn Then Windows + Alt + J
This is what Google's telling me anyway :)
Melissa Knapp
@MelEKn
Apr 10 2017 00:54
@SkyCoder01 thanks
CamperBot
@camperbot
Apr 10 2017 00:54
melekn sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:cookie: 956 | @skycoder01 |http://www.freecodecamp.com/skycoder01
Gulsvi
@gulsvi
Apr 10 2017 00:55
Did that work?
Mohamed Derhalli
@derhallim
Apr 10 2017 00:55
@SkyCoder01 u saw the browser stack, u can have "like" small VMs on the fly, to test for different OS/browsers
Huh
Gulsvi
@gulsvi
Apr 10 2017 00:55
Yes, good! Errors are good
Now you can search for something like "free code camp" "No 'Access-Control-Allow-Origin' header is present on the requested resource" wikipedia and you'll find lots of answers
If you want to study it more. For now, I'll tell you it means you need to add &origin=* to the end of your URL
aRtoo
@artoodeeto
Apr 10 2017 00:56

hi im on 183 on my fcc. quick question. i made a console.log to show what is the output and nothing is showing. heres the code:

// Example
function ourTrueOrFalse(isItTrue) {
if (isItTrue) {
return "Yes, it's true";
}
return "No, it's false";
}

// Setup
function trueOrFalse(wasThatTrue) {

// Only change code below this line.

  var y = true;
  var x = false;

if(wasThatTrue == y){
return "Yes, that was true";
}
else{
return "No, that was false";
}
// Only change code above this line.

}

// Change this value to test
trueOrFalse(true);
console.log("checking:" + trueOrFalse , wasThatTrue);

Mohamed Derhalli
@derhallim
Apr 10 2017 00:57
@MelEKn
var apiURL1 = "https://en.wikipedia.org/w/api.php?action=opensearch&limit=10&format=json&callback=?&search=";
Gulsvi
@gulsvi
Apr 10 2017 00:57
Don't use callback=? unless you have to :) use &origin=*
JSONP is a last resort
Mohamed Derhalli
@derhallim
Apr 10 2017 00:57
that's what I found once reading on how to use wikipedia api
Melissa Knapp
@MelEKn
Apr 10 2017 00:58
thank you @SkyCoder01
CamperBot
@camperbot
Apr 10 2017 00:58
melekn sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:warning: melekn already gave skycoder01 points
Gulsvi
@gulsvi
Apr 10 2017 00:59
&callback=? works for the majority of those kinds of errors if you're using $.getJSON.
Pagnito
@Pagnito
Apr 10 2017 01:00
@SkyCoder01 i thought streams is whats going to tell me whos online, but i just looked up an online user and its returning null
Gulsvi
@gulsvi
Apr 10 2017 01:00
@Pagnito What's the URL?
Gulsvi
@gulsvi
Apr 10 2017 01:01
You might want to log the URL after the variable has been expanded. This works fine:
https://wind-bow.glitch.me/twitch-api/streams/esl_sc2
https://wind-bow.glitch.me/twitch-api/streams/freecodecamp
Melissa Knapp
@MelEKn
Apr 10 2017 01:02
@SkyCoder01 I don't think I used &callback=?
Pagnito
@Pagnito
Apr 10 2017 01:02
@SkyCoder01 so make a call for every user?
Mohamed Derhalli
@derhallim
Apr 10 2017 01:02
@MelEKn I did
Pagnito
@Pagnito
Apr 10 2017 01:02
@SkyCoder01 oh wait im alrdy doing that lol
Gulsvi
@gulsvi
Apr 10 2017 01:02
lol
Melissa Knapp
@MelEKn
Apr 10 2017 01:03
Yaaaay!
Pagnito
@Pagnito
Apr 10 2017 01:03
@SkyCoder01 my call is working but, streams object has a property of null
Gulsvi
@gulsvi
Apr 10 2017 01:03
@MelEKn Sorry for the confusion, but the "Yaaaay!" must be good news :)
Pagnito
@Pagnito
Apr 10 2017 01:03
@Pagnito but the June_TV is online
Gulsvi
@gulsvi
Apr 10 2017 01:03
@Pagnito Do a console.log() and see what URL it's really trying to call
Open that url in your browser and see - maybe an extra quote somewhere
or misspelled user name in your array
Pagnito
@Pagnito
Apr 10 2017 01:04
ok
they're using callback
Melissa Knapp
@MelEKn
Apr 10 2017 01:04
@SkyCoder01 Yes, it is! :D Though I still don't know what &callback=? is and when to use it, but I'm sure I'll figure that out eventually ;)
Gulsvi
@gulsvi
Apr 10 2017 01:05
@derhallim They're using JSONP when they don't have to
Check out the Origin section of the API Sandbox

origin

When accessing the API using a cross-domain AJAX request (CORS), set this to the originating domain. This must be included in any pre-flight request, and therefore must be part of the request URI (not the POST body).
...
For non-authenticated requests, specify the value *. This will cause the Access-Control-Allow-Origin header to be set, but Access-Control-Allow-Credentials will be false and all user-specific data will be restricted.
^^^ That last sentence means, use &origin=* then you don't have to use JSONP
Mohamed Derhalli
@derhallim
Apr 10 2017 01:07
send me page url plz
Mohamed Derhalli
@derhallim
Apr 10 2017 01:07
thanks @SkyCoder01
CamperBot
@camperbot
Apr 10 2017 01:07
derhallim sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:cookie: 957 | @skycoder01 |http://www.freecodecamp.com/skycoder01
Gulsvi
@gulsvi
Apr 10 2017 01:08
Guess you don't need all the other junk at the end lol
Mohamed Derhalli
@derhallim
Apr 10 2017 01:08
yea it sent me somewhere else :'(
Gulsvi
@gulsvi
Apr 10 2017 01:09
&callback=? also works perfectly fine, but other people here in FCC will agree - don't use JSONP if you don't have to :)
Mohamed Derhalli
@derhallim
Apr 10 2017 01:10
i remember in the main chat room they were discussing it once, and they sent a link to an article, and they advised the guy to use callback :'(
that's basically my background about it
:'(
so i searched in the history for that page they linked to, which is the 1 i sent to u
but u know in these things way better than me, so u can tell if it's right or not
aRtoo
@artoodeeto
Apr 10 2017 01:14
hi im on 183 on my fcc. quick question. i made a console.log to show what is the output and nothing is showing. heres the code:
function trueOrFalse(wasThatTrue) {

      var y = true;
      var x = false;

  if(wasThatTrue == y){
    return "Yes, that was true";
  }
  else{
    return "No, that was false";
  }  


}

trueOrFalse(true);
 console.log("checking:" + trueOrFalse , wasThatTrue);
Melissa Knapp
@MelEKn
Apr 10 2017 01:14

So, why does

var test = data[0].title;

destroy "data" afterwards, and how can I get the same variable without making the object named "data" unuseable?

Wait... it didn't destroy it this time
Mohamed Derhalli
@derhallim
Apr 10 2017 01:15
@artoodeeto u r logging the function itself
and wasThatTrue is not in the scope of console.log
aRtoo
@artoodeeto
Apr 10 2017 01:16
@derhallim im confused. i was putting that console log back in and out the function but its not displaying
Gulsvi
@gulsvi
Apr 10 2017 01:16
@derhallim Sorry, stepped away. They both work. &origin=* and &callback=?. The difference is between JSON and JSONP.
@artoodeeto Try it this way:
function trueOrFalse(wasThatTrue) {
  var y = true;
  var x = false;

  if (wasThatTrue == y) {
    return "Yes, that was true";
  } else {
    return "No, that was false";
  }
}

var output = trueOrFalse(true);
console.log("checking: " + output);
Mohamed Derhalli
@derhallim
Apr 10 2017 01:17
@artoodeeto :
function trueOrFalse(wasThatTrue) {

      var y = true;
      var x = false;

  if(wasThatTrue == y){
    return "Yes, that was true";
  }
  else{
    return "No, that was false";
  }  


}

var val = trueOrFalse(true);
 console.log("result of check: " +  val);
Gulsvi
@gulsvi
Apr 10 2017 01:17
Great minds ^^ :)
Mohamed Derhalli
@derhallim
Apr 10 2017 01:17
:'(
both logged true :'(
Melissa Knapp
@MelEKn
Apr 10 2017 01:18
and now it destroys it again... what is going on?
aRtoo
@artoodeeto
Apr 10 2017 01:18
@derhallim why cant i use the parameter of the fucntion it self?? isnt that the same thing??
Mohamed Derhalli
@derhallim
Apr 10 2017 01:19
@artoodeeto if you do log (trueOrFalse) .. u r logging the function itself. if you want to log the RESULT of the function, you need to CALL it .. so trueOrFalse().. use () to call.. and pass a value either true or false
Melissa Knapp
@MelEKn
Apr 10 2017 01:19

OK, why does

var test = data[0].query.pages;

destroy "data" afterwards, and how can I get the same variable without making the object named "data" unuseable?

Gulsvi
@gulsvi
Apr 10 2017 01:19
@MelEKn Not sure what you mean by "destroys"?
Melissa Knapp
@MelEKn
Apr 10 2017 01:20

@SkyCoder01

Like, if I comment that line out, then
$("#testAPI").html(JSON.stringify(data));
returns the whole API, but if I don't comment out that line, then
$("#testAPI").html(JSON.stringify(data));
doesn't do anything at all.

Mohamed Derhalli
@derhallim
Apr 10 2017 01:20
 console.log("checking:" + trueOrFalse , wasThatTrue);

here wastThatTrue is not in the scope of console.log, it's an inner variable in the function, so delete it from the log..

trueOrFalse is the name of the function, you need the result of the function

aRtoo
@artoodeeto
Apr 10 2017 01:20
@derhallim so i really need it to assign the value to another varialble just to display it?
Mohamed Derhalli
@derhallim
Apr 10 2017 01:21

u can do

 console.log("checking:" + trueOrFalse(true) );

on same line

Gulsvi
@gulsvi
Apr 10 2017 01:21
@MelEKn It's probably an error - if data[0] doesn't exist, your code stops running because of the error
Check your developer console?
Derek B. McIntire
@derekbmcintire
Apr 10 2017 01:23
Hey everyone - got a question about forms/input and using them with jquery/javascript. I'm working on my wikipedia search project and trying to figure out how to get the search to initiate with the enter key. I do not have my input field wraped in a <form> element - is that best practice? Are <form> elements only for receiving and and storing information in a URL via the "action" property? can I use the "action" property to store input data in a variable?
Melissa Knapp
@MelEKn
Apr 10 2017 01:23
@SkyCoder01 OK, thanks... ugh, is there a good resource for how I get the different elements of an API then? I only had a single entry to contend with for the Weather API :P
CamperBot
@camperbot
Apr 10 2017 01:23
melekn sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:warning: melekn already gave skycoder01 points
Saboor Malik
@MathematicsCoding
Apr 10 2017 01:24
Google exists.
Gulsvi
@gulsvi
Apr 10 2017 01:24
@MelEKn This is great practice for using your developer console, actually. It lets you browse through the JSON object returned
The Wikipedia API is a huge step up in complexity with the data returned. Feel free to ask us here for help
Melissa Knapp
@MelEKn
Apr 10 2017 01:25
the Wikipedia API is so confusing to me... all the information about the page is inside an array that's titled by the pageid, INCLUDING the value of the pageid! What is this madness?
"pages": {
"33673337": {
"pageid": 33673337,
Gulsvi
@gulsvi
Apr 10 2017 01:25
@derekbmcintire Yes, wrapping your input in a <form> element is a great way to do it. That way you don't have to monitor keypresses - the browser just submits on Enter
Melissa Knapp
@MelEKn
Apr 10 2017 01:26
@SkyCoder01 I think I'm reading it wrong, because the developer console doesn't shed any light on it
Mohamed Derhalli
@derhallim
Apr 10 2017 01:26
@derekbmcintire i wouldn't hit the server with a request each time the user types a letter.. maybe for the wikipedia it's ok, but later on if u work on a solution for a company, u wouldnt wanna do that.. they would just wait for the user to type 3 letters, then hit the web service
Derek B. McIntire
@derekbmcintire
Apr 10 2017 01:26
ahh, do I need to use the "action" element?
Gulsvi
@gulsvi
Apr 10 2017 01:27
I don't know if you can use the action property for that - you don't really need to. This is a tutorial'ish page I wrote on getting the value from a textbox when hitting Enter: http://codepen.io/skycoder/pen/MpKpJj @derekbmcintire
Mohamed Derhalli
@derhallim
Apr 10 2017 01:27
@MelEKn do a console.log on the first result coming from the web service

so if u have function(json){
console.log(json);
}

and see what it has

Gulsvi
@gulsvi
Apr 10 2017 01:28
image.png
@MelEKn This is an example of what you get in the console
if you do console.log(data)
Then you can copy the path, see how it works. Spend some time getting comfortable with parsing JSON objects
Melissa Knapp
@MelEKn
Apr 10 2017 01:29
but what about the crazy numbers? They won't be the same every time will they?
Gulsvi
@gulsvi
Apr 10 2017 01:29
@MelEKn right, they're unique page IDs. They'll be different.
Mohamed Derhalli
@derhallim
Apr 10 2017 01:29
u won't use these numbers in code
Gulsvi
@gulsvi
Apr 10 2017 01:29
This is about JavaScript now, not Wikipedia
Mohamed Derhalli
@derhallim
Apr 10 2017 01:29
@artoodeeto did u get it?
Melissa Knapp
@MelEKn
Apr 10 2017 01:30
@SkyCoder01 then how do I follow the path without using the numbers that are part of the path?
Mohamed Derhalli
@derhallim
Apr 10 2017 01:30
@derekbmcintire why do u wanna use the action element?
aRtoo
@artoodeeto
Apr 10 2017 01:30
@derhallim im sorry i didnt get you. tried of making a false value but i still get true
Mohamed Derhalli
@derhallim
Apr 10 2017 01:31
@artoodeeto post ur code again
Gulsvi
@gulsvi
Apr 10 2017 01:32
@MelEKn You can use Object.keys() or a for...in loop.
aRtoo
@artoodeeto
Apr 10 2017 01:32
// Setup
function trueOrFalse(wasThatTrue) {

  // Only change code below this line.



  if(wasThatTrue){
    return "Yes, that was true";
  }
  else{
    return "No, that was false";

  }  
  // Only change code above this line.


}
// Change this value to test
trueOrFalse(1=='f');
 //console.log("checkingggggggggggggggggggggggg:" + wasThatTrue);
Mohamed Derhalli
@derhallim
Apr 10 2017 01:32
@artoodeeto what do u mean by 1=='f' ???
Saboor Malik
@MathematicsCoding
Apr 10 2017 01:33
:wave:
Mohamed Derhalli
@derhallim
Apr 10 2017 01:33
@artoodeeto u wanna pass false value?
aRtoo
@artoodeeto
Apr 10 2017 01:33
@derhallim im trying to get a false value. but instead im getting a true on my console
Saboor Malik
@MathematicsCoding
Apr 10 2017 01:34
@SkyCoder01 Hey
Do you know geo location?
Mohamed Derhalli
@derhallim
Apr 10 2017 01:34
@artoodeeto
function trueOrFalse(wasThatTrue) {

  // Only change code below this line.



  if(wasThatTrue){
    return "Yes, that was true";
  }
  else{
    return "No, that was false";

  }  
  // Only change code above this line.


}
// Change this value to test
console.log(trueOrFalse(1=='f'));
it prints back false
aRtoo
@artoodeeto
Apr 10 2017 01:34
@derhallim yea. but im getting a true on my console.log
Mohamed Derhalli
@derhallim
Apr 10 2017 01:34
this same code, i got false :P
how are u getting true?
Gulsvi
@gulsvi
Apr 10 2017 01:35
@MathematicsCoding Yes, I know geolocation
Saboor Malik
@MathematicsCoding
Apr 10 2017 01:35
Yeah you know button, click it then it will tell your coordinate
Im trying do that
aRtoo
@artoodeeto
Apr 10 2017 01:35
@derhallim with ur code im getting false on the console.
@derhallim now im really confused
Mohamed Derhalli
@derhallim
Apr 10 2017 01:36
@artoodeeto in ur code, u r not doing any console.log
aRtoo
@artoodeeto
Apr 10 2017 01:36
@derhallim why is it urs is getting correct answer and mine is wrong
Mohamed Derhalli
@derhallim
Apr 10 2017 01:36
@artoodeeto the only difference between my code and urs, is that am doing console.log, u r not
aRtoo
@artoodeeto
Apr 10 2017 01:36
@derhallim i did. i deleted the comment
@derhallim trueOrFalse(1=='f');
console.log("checkingggggggggggggggggggggggg:" + wasThatTrue);
Mohamed Derhalli
@derhallim
Apr 10 2017 01:37

not the comment, u only call the function

trueOrFalse(1=='f');

I logg it

aRtoo
@artoodeeto
Apr 10 2017 01:37
@derhallim
trueOrFalse(1=='f');
 console.log("checkingggggggggggggggggggggggg:" + wasThatTrue);
Mohamed Derhalli
@derhallim
Apr 10 2017 01:37
maaaaaaaaaaaaan
Saboor Malik
@MathematicsCoding
Apr 10 2017 01:37
...
Mohamed Derhalli
@derhallim
Apr 10 2017 01:37
wasThatTrue is not in the same scope as ur console.log
Saboor Malik
@MathematicsCoding
Apr 10 2017 01:37
Yeah
They doesnt do anything
Mohamed Derhalli
@derhallim
Apr 10 2017 01:38
wasThatTrue is a parameter for the function, its scope is for the function
u can't use it outside
do this:

 console.log("checkingggggggggggggggggggggggg:   " + trueOrFalse(1=='f'));
@artoodeeto u understand scopes and parameters?
a variable is always in the scope of its function, where did the wasThatTrue exist? inside the trueOrFalse function as a param, how can u use it outside?
aRtoo
@artoodeeto
Apr 10 2017 01:40
@derhallim i think so. parameters are what is inside the value of the function right?? or the value
Saboor Malik
@MathematicsCoding
Apr 10 2017 01:40
@SkyCoder01 Can you check out my code?
Mohamed Derhalli
@derhallim
Apr 10 2017 01:40

you return a value from the function, you can store this value in a variable like:

var val = trueOrFalse(1=='f');

aRtoo
@artoodeeto
Apr 10 2017 01:41
@derhallim i only thought that you cant use VARIABLES OUTSIDE the function. not the parameters. you can call it globally
Saboor Malik
@MathematicsCoding
Apr 10 2017 01:41
Dont use var for parameter
Just saying
Mohamed Derhalli
@derhallim
Apr 10 2017 01:41
@artoodeeto parameters are always in the scope of function only
Gulsvi
@gulsvi
Apr 10 2017 01:41
@MathematicsCoding Sure
Mohamed Derhalli
@derhallim
Apr 10 2017 01:41
that var is not for parameter, it's for the returned value from the function @MathematicsCoding
aRtoo
@artoodeeto
Apr 10 2017 01:42
@derhallim ohhh. it wast said on the previous tutorial
Saboor Malik
@MathematicsCoding
Apr 10 2017 01:42
FYI this isnt my weather api project
aRtoo
@artoodeeto
Apr 10 2017 01:42
@derhallim but thanks for that info
CamperBot
@camperbot
Apr 10 2017 01:42
artoodeeto sends brownie points to @derhallim :sparkles: :thumbsup: :sparkles:
:cookie: 165 | @derhallim |http://www.freecodecamp.com/derhallim
Saboor Malik
@MathematicsCoding
Apr 10 2017 01:42
Im just testing
Gulsvi
@gulsvi
Apr 10 2017 01:42
@MathematicsCoding Uncaught ReferenceError: $ is not defined
Mohamed Derhalli
@derhallim
Apr 10 2017 01:42
@artoodeeto perfect!
Saboor Malik
@MathematicsCoding
Apr 10 2017 01:42
Oh I forgot to add jQuery..
again
Gulsvi
@gulsvi
Apr 10 2017 01:42
:p
Saboor Malik
@MathematicsCoding
Apr 10 2017 01:43
it works thanks again..
@SkyCoder01 How did you find out?
Mohamed Derhalli
@derhallim
Apr 10 2017 01:43
he is @SkyCoder01 :P
Saboor Malik
@MathematicsCoding
Apr 10 2017 01:43
...
Console in chrome?
aRtoo
@artoodeeto
Apr 10 2017 01:43
@derhallim thanks man. u da best
CamperBot
@camperbot
Apr 10 2017 01:43
artoodeeto sends brownie points to @derhallim :sparkles: :thumbsup: :sparkles:
:warning: artoodeeto already gave derhallim points
Mohamed Derhalli
@derhallim
Apr 10 2017 01:43
the guy reads the docs of jQuery one page at a time :'(
what are u expecting from him
:'(
Gulsvi
@gulsvi
Apr 10 2017 01:44
@MathematicsCoding The developer console in your browser will tell you
Saboor Malik
@MathematicsCoding
Apr 10 2017 01:44
I see
Gulsvi
@gulsvi
Apr 10 2017 01:44
lol @derhallim
Saboor Malik
@MathematicsCoding
Apr 10 2017 01:44
You know ctrl + j + shift doesnt work for me
Gulsvi
@gulsvi
Apr 10 2017 01:44
@MathematicsCoding Are you on a mac?
Saboor Malik
@MathematicsCoding
Apr 10 2017 01:44
I had to right click, click inspect, etc...
Yes
Gulsvi
@gulsvi
Apr 10 2017 01:44
Command + Option + J
Saboor Malik
@MathematicsCoding
Apr 10 2017 01:44
...
Gulsvi
@gulsvi
Apr 10 2017 01:45
no those are three dots
Command + Option + J
:)
Melissa Knapp
@MelEKn
Apr 10 2017 01:45

Anyone know how I get rid of this error?

VM1201 bootstrap.min.js:7 Uncaught Error: Bootstrap tooltips require Tether (http://tether.io/)
at VM1201 bootstrap.min.js:7
at VM1201 bootstrap.min.js:7
at VM1201 bootstrap.min.js:7

Saboor Malik
@MathematicsCoding
Apr 10 2017 01:45
Seriously someone told these is for mac too lol
Melissa Knapp
@MelEKn
Apr 10 2017 01:45
I'm getting it over and over
Saboor Malik
@MathematicsCoding
Apr 10 2017 01:45
Wasted my time
Gulsvi
@gulsvi
Apr 10 2017 01:45
@MathematicsCoding That's what the documentation says: https://developers.google.com/web/tools/chrome-devtools/shortcuts
Mohamed Derhalli
@derhallim
Apr 10 2017 01:46
are u using BS4?
Melissa Knapp
@MelEKn
Apr 10 2017 01:47
@derhallim I'm using whatever CodePen uses
Gulsvi
@gulsvi
Apr 10 2017 01:47
@MelEKn It means that you need to add the tether.io library to use Bootstrap.js.
Codepen doesn't use bootstrap - you have to add it manually
Mohamed Derhalli
@derhallim
Apr 10 2017 01:47
^
Saboor Malik
@MathematicsCoding
Apr 10 2017 01:48
@SkyCoder01 How do I make this background color in div element a box?
Gulsvi
@gulsvi
Apr 10 2017 01:48
Which color?
Saboor Malik
@MathematicsCoding
Apr 10 2017 01:48
White
There is only one div element ya know?
Gulsvi
@gulsvi
Apr 10 2017 01:49
You have it set up correctly already, the .w class
.w {
  background-color: white;
}
Melissa Knapp
@MelEKn
Apr 10 2017 01:49
@SkyCoder01 It lets you add it by clicking a button in Settings, I'm using whatever version it automatically adds when you click the button in settings
Saboor Malik
@MathematicsCoding
Apr 10 2017 01:49
@SkyCoder01 no I mean like the horizon?
Not too long
Gulsvi
@gulsvi
Apr 10 2017 01:49
@MelEKn You don't need to use bootstrap.js - unless you plan on adding Bootstrap components later that require Bootstrap.js
if you do, then you'll need to add the Tether.io library as well
@MathematicsCoding I'm sorry, but I don't understand what you mean by the horizon
Saboor Malik
@MathematicsCoding
Apr 10 2017 01:51
....
Melissa Knapp
@MelEKn
Apr 10 2017 01:51
@SkyCoder01 ok thanks
CamperBot
@camperbot
Apr 10 2017 01:51
melekn sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:warning: melekn already gave skycoder01 points
Melissa Knapp
@MelEKn
Apr 10 2017 01:51
@SkyCoder01 Oh, when I went to remove it, it looks like it's already not included.
@SkyCoder01 So why the error? nooo idea
Saboor Malik
@MathematicsCoding
Apr 10 2017 01:52
@SkyCoder01
Gulsvi
@gulsvi
Apr 10 2017 01:52
@MelEKn I'm looking at your pen right now and you definitely have it in your settings. Click the "Settings" button, click "JavaScript" and then click the "X" at the right of the box that lists bootstrap.min.js
Saboor Malik
@MathematicsCoding
Apr 10 2017 01:52
@SkyCoder01 Get it?
Melissa Knapp
@MelEKn
Apr 10 2017 01:53
@SkyCoder01 You're looking at this one? http://codepen.io/SafiSana/pen/BWXQvw
Gulsvi
@gulsvi
Apr 10 2017 01:54
No, I was looking at this one: http://codepen.io/SafiSana/pen/yMmJmY?editors=1000
@SkyCoder01
Gulsvi
@gulsvi
Apr 10 2017 01:54
@MathematicsCoding The pen you just shared does not give that error
Saboor Malik
@MathematicsCoding
Apr 10 2017 01:55
What part do you not understand...
Melissa Knapp
@MelEKn
Apr 10 2017 01:55
@SkyCoder01 OK, well I'm working on the one I just posted and it still has the Bootstrap error
Gulsvi
@gulsvi
Apr 10 2017 01:55
@MathematicsCoding I am sorry, but I see an X over a rectangle with another rectangle below it and a triangle on top of all of that
Saboor Malik
@MathematicsCoding
Apr 10 2017 01:55
...
Gulsvi
@gulsvi
Apr 10 2017 01:55
@MelEKn I promise you it does not :)
It might be left over from your previous pen
Clear the console and refresh.
click on the CSS options
Gulsvi
@gulsvi
Apr 10 2017 01:56
There are no errors in Melissa's newer pen. Just the old one.
Melissa Knapp
@MelEKn
Apr 10 2017 01:56
sj_884665513.js:1 Uncaught SyntaxError: Unexpected token <
Is an error I'm getting
Mohamed Derhalli
@derhallim
Apr 10 2017 01:57
her new pen uses bootstrap
4
Melissa Knapp
@MelEKn
Apr 10 2017 01:57
and has a little angry x next to <html>
Gulsvi
@gulsvi
Apr 10 2017 01:57
image.png
I don't know what that means @MathematicsCoding
Mohamed Derhalli
@derhallim
Apr 10 2017 01:57
@MelEKn click on the CSS settings in codepen
Better?
Mohamed Derhalli
@derhallim
Apr 10 2017 01:58
codepen is using BS4 by default :'(
Melissa Knapp
@MelEKn
Apr 10 2017 01:59

Well, when I refreshed it, the only error I'm getting is the one where it's angry about the first line

sj_884665513.js:1 Uncaught SyntaxError: Unexpected token < 

Mohamed Derhalli
@derhallim
Apr 10 2017 01:59
save it, and ur ready to go
Gulsvi
@gulsvi
Apr 10 2017 01:59
@MathematicsCoding Use margin-top to push the button down. Use text-align: center to center it
Melissa Knapp
@MelEKn
Apr 10 2017 01:59
and has a red x next to <html>
Saboor Malik
@MathematicsCoding
Apr 10 2017 01:59
@SkyCoder01 Both or either of these?
Mohamed Derhalli
@derhallim
Apr 10 2017 01:59
remove the tether.js from the html
Gulsvi
@gulsvi
Apr 10 2017 02:00
@MathematicsCoding margin-top gives the button space above it. text-align: center will center it on the page.
Melissa Knapp
@MelEKn
Apr 10 2017 02:00
@derhallim Er, thank you, but same problem as before, that doesn't actually make me learn what the problem was
CamperBot
@camperbot
Apr 10 2017 02:00
melekn sends brownie points to @derhallim :sparkles: :thumbsup: :sparkles:
:cookie: 166 | @derhallim |http://www.freecodecamp.com/derhallim
Mohamed Derhalli
@derhallim
Apr 10 2017 02:00
@MelEKn the problem is, when u use codepen and ask it to reference bootstrap, it references bootstrap 4
if you followed what i told u, u would have known
:P
click on the CSS options in codepen
u will see a list of references
Melissa Knapp
@MelEKn
Apr 10 2017 02:01
@derhallim Sorry, I only saw you link to a version of my pen and telling me to link to it :(
Mohamed Derhalli
@derhallim
Apr 10 2017 02:01
i did that because u didn't follow what i said :P
was the last solution :'(
Melissa Knapp
@MelEKn
Apr 10 2017 02:02
@derhallim I went to the stackoverflow link you posted...
Mohamed Derhalli
@derhallim
Apr 10 2017 02:02
if u click on the CSS options in codepen, u will CSS all css referenced there
Melissa Knapp
@MelEKn
Apr 10 2017 02:02
Sorry, getting different things from different places
Ali Ahmad
@aliahmad-code
Apr 10 2017 02:02
Has anyone read eloquent javascript?
Mohamed Derhalli
@derhallim
Apr 10 2017 02:02
u don't need to reference bootstrap 4
so i deleted it
and i referenced BS3 from here: http://getbootstrap.com/getting-started/
Tanushree Samanta
@TSamanta
Apr 10 2017 02:03
hey! how to get the hamburger menu visible only for mobile devices?
Mohamed Derhalli
@derhallim
Apr 10 2017 02:03
and sent u the link
Melissa Knapp
@MelEKn
Apr 10 2017 02:03
Yours still has the error at line 1 :P
Tanushree Samanta
@TSamanta
Apr 10 2017 02:03
@derhallim checked your link
Mohamed Derhalli
@derhallim
Apr 10 2017 02:03
i always check BK if i wanna see that menu :'(
Tanushree Samanta
@TSamanta
Apr 10 2017 02:03
it was good
Done...
Mohamed Derhalli
@derhallim
Apr 10 2017 02:04
@MelEKn send me ur WHOLE code on codepen
Melissa Knapp
@MelEKn
Apr 10 2017 02:04
Mohamed Derhalli
@derhallim
Apr 10 2017 02:04
@MelEKn are u getting error locally on ur machine or codepen?
@TSamanta i still think html preprocessors aren't that useful, with a BIG page, it would be hard to follow, but maybe that's just me
Tanushree Samanta
@TSamanta
Apr 10 2017 02:06
yeah but it's easier to read when DRY is maintained but otherwise nothing like omgI would die without it
i am really disappointed they used the word preprocessors
with it
:P
Melissa Knapp
@MelEKn
Apr 10 2017 02:07
@derhallim with the thing on the right, I forget what it's called, where I can see the console?
Tanushree Samanta
@TSamanta
Apr 10 2017 02:07
it made it sound super promising
Mohamed Derhalli
@derhallim
Apr 10 2017 02:07
easier to read if the markup wasn't that much, but for a big page with many embedded elements, etc.. dunno how would I read that
developer tools @MelEKn
Tanushree Samanta
@TSamanta
Apr 10 2017 02:07
yeah that's true
Mohamed Derhalli
@derhallim
Apr 10 2017 02:08
@MelEKn upload the files somewhere online, so I can download them, codepen doesn't show anyth
Melissa Knapp
@MelEKn
Apr 10 2017 02:08
It doesn't really matter. So is there some way to get past the page numbers to get to the actual text besides ... actually I'm not even sure how to get past the numbers. If I went to get past pages to, say, "title", how do I do that?
I'm doing the Wikipedia Viewer, how do I get data that's past the page IDs?
Mohamed Derhalli
@derhallim
Apr 10 2017 02:11
am gonna check that
give me a min
Tanushree Samanta
@TSamanta
Apr 10 2017 02:11
page ID's?
like the link and stuff?
Melissa Knapp
@MelEKn
Apr 10 2017 02:12
Object {batchcomplete: "", continue: Object, query: Object, limits: Object}
batchcomplete
:
""
continue
:
Object
limits
:
Object
query
:
Object
pages
:
Object
30863
:
Object
54995
:
Object
188261
:
Object
276250
:
Object
536080
:
Object
1086547
:
Object
the ones that are just long numbers
blob
Tanushree Samanta
@TSamanta
Apr 10 2017 02:13
oh but what do you want ?
like what is the array
being sent
when you search for a keyword?
Ken Haduch
@khaduch
Apr 10 2017 02:14
@MelEKn - I just dropped in and am taking a look at the CodePen link you posted. You are trying to do something like this: var titleText = Object.keys(data.query.pages.title); and that is not working. The structure of the data is different - each page has a title, but you have to have a page ID in the middle like data.query.pages[ID_VALUE].title and that ID value is one of the keys of query.pages - so you would have to get the keys of data.query.pages in order to take the next step.
Melissa Knapp
@MelEKn
Apr 10 2017 02:14
@TSamanta I'm not sure I understand the question. I'm trying to open up the objects that are the numbers, but it's not working for some reason
Mohamed Derhalli
@derhallim
Apr 10 2017 02:15
@MelEKn try this:
Object.keys(data.query.pages).forEach(function(q){
console.log(q.title);
});
Melissa Knapp
@MelEKn
Apr 10 2017 02:15
blob
As you can see from the upside-down triangles, I clicked to open them, but it says nothing is there ??
Mohamed Derhalli
@derhallim
Apr 10 2017 02:15
so ur getting the data ok? the data has query object, that has pages object, with properties as numbers
u need to get these properties, using Object.keys(data.query.pages), and loop through all
then u can access each page using properties
try to expand one of these objects (numbers), u'll see title, index, extract
Melissa Knapp
@MelEKn
Apr 10 2017 02:16
@derhallim So I can't even see it on the console until I write the code? @SkyCoder01 seemed to imply that I'd be able to use the console to understand better how to write the code to get at them...
Mohamed Derhalli
@derhallim
Apr 10 2017 02:17
yes
Saboor Malik
@MathematicsCoding
Apr 10 2017 02:17
How do I write degree? like in tempature
Mohamed Derhalli
@derhallim
Apr 10 2017 02:17
u r already seeing it in the console, try to expand one of the numbers
Saboor Malik
@MathematicsCoding
Apr 10 2017 02:17
Do I have to have font awesome for degree?
Melissa Knapp
@MelEKn
Apr 10 2017 02:17
@derhallim I did, look at the triangles
Gulsvi
@gulsvi
Apr 10 2017 02:17
@MelEKn You need to console.log(data) as you have. Once you refresh the page, however, those triangles don't expand any more
Melissa Knapp
@MelEKn
Apr 10 2017 02:17
@derhallim See how some of them point to the right and some of them are upside down?
@derhallim The ones that I clicked to open are pointing upside down, but they're not displaying anything
Gulsvi
@gulsvi
Apr 10 2017 02:18
Codepen refreshes the page if you change a single letter in your JavaScript or HTML, so the data is gone
Melissa Knapp
@MelEKn
Apr 10 2017 02:19
@SkyCoder01 Ahhh, okay, I refreshed, and there it is! Thanks.
CamperBot
@camperbot
Apr 10 2017 02:19
melekn sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:cookie: 958 | @skycoder01 |http://www.freecodecamp.com/skycoder01
Gulsvi
@gulsvi
Apr 10 2017 02:20
@MathematicsCoding See how that works ^^ you help people and....
they say "thanks" :)
Saboor Malik
@MathematicsCoding
Apr 10 2017 02:20
@SkyCoder01 I know
I just dont wanna give you my cookies :)
Gulsvi
@gulsvi
Apr 10 2017 02:20
I don't want cookies, just don't want to help people who were raised by :wolf:
wolves :)
Mohamed Derhalli
@derhallim
Apr 10 2017 02:20
blob
Saboor Malik
@MathematicsCoding
Apr 10 2017 02:21
@SkyCoder01 What do you think of this?
Mohamed Derhalli
@derhallim
Apr 10 2017 02:21
nice weather background
Melissa Knapp
@MelEKn
Apr 10 2017 02:22
@MathematicsCoding They're brownies, not cookies, so you should feel free to give them ;)
Saboor Malik
@MathematicsCoding
Apr 10 2017 02:22
But its cookie to me
Mohamed Derhalli
@derhallim
Apr 10 2017 02:23
that's what happens to u when u deal too much with cookies ..
Gulsvi
@gulsvi
Apr 10 2017 02:23
image.png
@MathematicsCoding I think you can make it more responsive
Mohamed Derhalli
@derhallim
Apr 10 2017 02:23
(the technical cookies)
Saboor Malik
@MathematicsCoding
Apr 10 2017 02:24
@SkyCoder01 I dont know how...
SOmeone told me background-image covers will make it responsive...
:(
Gulsvi
@gulsvi
Apr 10 2017 02:24
:point_up: This is great advice, @MathematicsCoding :)
Saboor Malik
@MathematicsCoding
Apr 10 2017 02:24
...
Mohamed Derhalli
@derhallim
Apr 10 2017 02:25
:'( who's that "someone"
Saboor Malik
@MathematicsCoding
Apr 10 2017 02:25
I dont remember their name lol
Mohamed Derhalli
@derhallim
Apr 10 2017 02:25
W.A.N.T.E.D
responsive design criminal
i wish if i can just add images and my design would be responsive :'(
Gulsvi
@gulsvi
Apr 10 2017 02:25
Grid Systems make it responsive
Saboor Malik
@MathematicsCoding
Apr 10 2017 02:25
I think that person's profile pic is like... Idk
Mohamed Derhalli
@derhallim
Apr 10 2017 02:26
his profile pic is responsive :'(
Gulsvi
@gulsvi
Apr 10 2017 02:26
lol
Saboor Malik
@MathematicsCoding
Apr 10 2017 02:26
lol
c0d0er
@c0d0er
Apr 10 2017 02:26
does anybody know why if i mouseover the small circles which is covered by big circles (e.g. biggest circle which cover spots in Japan and China), then the covered small circles' tooltips cannot be shown? http://codepen.io/c0d0er/pen/RpzOZO?editors=0010
Melissa Knapp
@MelEKn
Apr 10 2017 02:26
@derhallim that code just gave me a bunch of undefined things! :-(
Mohamed Derhalli
@derhallim
Apr 10 2017 02:26
which code?
Melissa Knapp
@MelEKn
Apr 10 2017 02:26
Object.keys(data.query.pages).forEach(function(q){
console.log(q.title);
});
@derhallim Technically, it gave me 10 undefined things
Mohamed Derhalli
@derhallim
Apr 10 2017 02:27
wait lemme see
Saboor Malik
@MathematicsCoding
Apr 10 2017 02:30
...
Idk how to make the screen fit
Mohamed Derhalli
@derhallim
Apr 10 2017 02:32
@MelEKn
Object.keys(data.query.pages).forEach(function(a,i){
console.log(data.query.pages[a].title);
});
u can use other properties u see in the dev tools
Saboor Malik
@MathematicsCoding
Apr 10 2017 02:34
I will find out how to make the screen fit once I completed this project
Mohamed Derhalli
@derhallim
Apr 10 2017 02:34
@MathematicsCoding how long did it take u to reach so far?
Saboor Malik
@MathematicsCoding
Apr 10 2017 02:34
This project?
Mohamed Derhalli
@derhallim
Apr 10 2017 02:34
yea
Saboor Malik
@MathematicsCoding
Apr 10 2017 02:34
Just this morning I guess
Melissa Knapp
@MelEKn
Apr 10 2017 02:35
@derhallim Thanks, will .forEach automatically cycle through both a and i?
CamperBot
@camperbot
Apr 10 2017 02:35
melekn sends brownie points to @derhallim :sparkles: :thumbsup: :sparkles:
:warning: melekn already gave derhallim points
Saboor Malik
@MathematicsCoding
Apr 10 2017 02:35
1-2 hours maybe? came back from lunch or dinner
Well I was working on button to click to tell you your coordinates
I didnt like just the text
Mohamed Derhalli
@derhallim
Apr 10 2017 02:36
@MelEKn forEach cycles through the array, and gives u the item each time, with a and i for each item, a represents the value, i represents the index
@MathematicsCoding that's cool man
there are few challenges here that deal with geo location
Saboor Malik
@MathematicsCoding
Apr 10 2017 02:37
Which one?
Mohamed Derhalli
@derhallim
Apr 10 2017 02:37
ummm let me remember
Saboor Malik
@MathematicsCoding
Apr 10 2017 02:37
ok lol
Mohamed Derhalli
@derhallim
Apr 10 2017 02:37
wait let me check the history, i was helping this guy with a challenge included geo location
i'll check codepen :'(
Saboor Malik
@MathematicsCoding
Apr 10 2017 02:38
xD
Mohamed Derhalli
@derhallim
Apr 10 2017 02:38
crap that was weather widget too :'(
Saboor Malik
@MathematicsCoding
Apr 10 2017 02:38
lol
There this challenge and map data
Melissa Knapp
@MelEKn
Apr 10 2017 02:39
@MathematicsCoding I never, ever got geo location to work for me on my computer. My code worked for other people on their computers, but not for me. When I go to other peoples' pens that use geolocation, they still don't work for me. A wonderfully helpful person on here suggested I just use the https://ipinfo.io API, and it worked perfectly.
Mohamed Derhalli
@derhallim
Apr 10 2017 02:39
the thing is, i never did the weather thing, but i know the geo location
Saboor Malik
@MathematicsCoding
Apr 10 2017 02:39
@MelEKn Which browser do you use?
Melissa Knapp
@MelEKn
Apr 10 2017 02:39
@MathematicsCoding Chrome, but I tried it in Firefox and Safari too, and it still didn't work
Gulsvi
@gulsvi
Apr 10 2017 02:39
This might be helpful for both of you: http://codepen.io/skycoder/post/apisandlocation
Mohamed Derhalli
@derhallim
Apr 10 2017 02:40
that's sky :'(
Saboor Malik
@MathematicsCoding
Apr 10 2017 02:40
Sky? where?
Melissa Knapp
@MelEKn
Apr 10 2017 02:40
@SkyCoder01 As I said, my pens worked for other people on their computers, and other people's pens I've looked at that use geolocation don't work when I go to them. It's not the code.
Gulsvi
@gulsvi
Apr 10 2017 02:41
@MelEKn It has a backup for computers like yours
Melissa Knapp
@MelEKn
Apr 10 2017 02:41
@SkyCoder01 Ooh, haha!
Gulsvi
@gulsvi
Apr 10 2017 02:41
The ipinfo.io above - at least tells you how to support both :)
Mohamed Derhalli
@derhallim
Apr 10 2017 02:41
intentions.clear()
then it would work
Melissa Knapp
@MelEKn
Apr 10 2017 02:42
@SkyCoder01 Wait, I just read through it and don't see it... is there a reason ipinfo.io will stop working for me in the future?
Gulsvi
@gulsvi
Apr 10 2017 02:42
@MelEKn If you're running an adblocker perhaps, or if the service goes down
Melissa Knapp
@MelEKn
Apr 10 2017 02:43
@SkyCoder01 OK
Gulsvi
@gulsvi
Apr 10 2017 02:43
The main point of the app is to learn about geoLocation and access your first API though. So if you learned all of that, then mission accomplished
Melissa Knapp
@MelEKn
Apr 10 2017 02:43
@SkyCoder01 I learned that geoLocation doesn't work for me :P lol
I need to buy a new computer anyway.
Gulsvi
@gulsvi
Apr 10 2017 02:44
You get a good intro to async functions too since you have to get location, wait for that to come back, and then get weather
Melissa Knapp
@MelEKn
Apr 10 2017 02:44
This one is so old Apple refuses to let me have AppleCare for it
Saboor Malik
@MathematicsCoding
Apr 10 2017 02:44
@MelEKn WHich computer do you use?
Melissa Knapp
@MelEKn
Apr 10 2017 02:44
AND the keyboard doesn't work
Saboor Malik
@MathematicsCoding
Apr 10 2017 02:44
Macbook? <2010?
Gulsvi
@gulsvi
Apr 10 2017 02:44
My macbook's keyboard is broken too :( spilled beer all over it
Saboor Malik
@MathematicsCoding
Apr 10 2017 02:44
lol
Gulsvi
@gulsvi
Apr 10 2017 02:44
then snapped a pin off the motherboard trying to replace my keyboard...
Melissa Knapp
@MelEKn
Apr 10 2017 02:44
If anyone has suggestions for good and yet very cheap computers, please let me know, lol. I currently work part time coaching gymnastics, so... yeah.
Mohamed Derhalli
@derhallim
Apr 10 2017 02:45
it's funny when u r in help javacsript or help front end, and u go to main chat room, they're discussing the inline styles in css and not to use them :'(
Saboor Malik
@MathematicsCoding
Apr 10 2017 02:45
I know someone who accidentally spilled ice cream on mac keyboard and worked for another few years
lol @derhallim
I dont like inline styles
Gulsvi
@gulsvi
Apr 10 2017 02:46
my kitty picture won't get smaller
Saboor Malik
@MathematicsCoding
Apr 10 2017 02:46
...
Gulsvi
@gulsvi
Apr 10 2017 02:46
It's fun over there too though :laughing:
Mohamed Derhalli
@derhallim
Apr 10 2017 02:47
yeaa , i hang out there often, but they talk too much about vims/clojures/php, which is like 100% opposite of what i knw
Saboor Malik
@MathematicsCoding
Apr 10 2017 02:49
Im reporting that chat
To that resposive guy
I found out that guy is also a moderator
:laughing:
syedshafaqatali
@syedshafaqatali
Apr 10 2017 02:49
Asalam O Alaikum
Omar Ibarra
@marberra24
Apr 10 2017 02:50
i need help with the build a tribute page project
Saboor Malik
@MathematicsCoding
Apr 10 2017 02:50
@SkyCoder01 You are muslim?
Gulsvi
@gulsvi
Apr 10 2017 02:50
No, I just love languages of all types
Saboor Malik
@MathematicsCoding
Apr 10 2017 02:50
oh..
syedshafaqatali
@syedshafaqatali
Apr 10 2017 02:51
I am stuck in building a Personal Portfolio Webpage
syedshafaqatali
@syedshafaqatali
Apr 10 2017 02:52
Saboor Malik aap say behtar hay wesy ye non muslim q k us nay salam ka jawab day dia.
Saboor Malik
@MathematicsCoding
Apr 10 2017 02:52
@marberra24 Thats example project
Omar Ibarra
@marberra24
Apr 10 2017 02:53
no
thats the one i have been working on
Gulsvi
@gulsvi
Apr 10 2017 02:54
@syedshafaqatali What can we help with?
@marberra24 Good job on your tribute page
Saboor Malik
@MathematicsCoding
Apr 10 2017 02:55
@SkyCoder01 What? its a example project
Gulsvi
@gulsvi
Apr 10 2017 02:55
There are some older elements you have used, if you want to make some updates. Like <center> and <font>
syedshafaqatali
@syedshafaqatali
Apr 10 2017 02:55
I need to know the method in js or jquery to scroll to specific place in a page
Gulsvi
@gulsvi
Apr 10 2017 02:55
He recreated it @MathematicsCoding
Saboor Malik
@MathematicsCoding
Apr 10 2017 02:56
Hm..
Will fCC accept it?
Omar Ibarra
@marberra24
Apr 10 2017 02:56
I did all of the text , i need help adding the color to the backgroung
Gulsvi
@gulsvi
Apr 10 2017 02:56
@syedshafaqatali Scroll down to the section "HTML Links - Create A Bookmark" here: https://www.w3schools.com/html/html_links.asp
Saboor Malik
@MathematicsCoding
Apr 10 2017 02:56
You want to change background color?
body {background-color: color;}
Gulsvi
@gulsvi
Apr 10 2017 02:57
It won't be a smooth scroll, but I don't think you are expected to implement that yet until you learn more javascript @syedshafaqatali
Saboor Malik
@MathematicsCoding
Apr 10 2017 02:57
But that will affect the text if you change background to black
syedshafaqatali
@syedshafaqatali
Apr 10 2017 02:57
@SkyCoder01 thank you
CamperBot
@camperbot
Apr 10 2017 02:57
syedshafaqatali sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:cookie: 959 | @skycoder01 |http://www.freecodecamp.com/skycoder01
Gulsvi
@gulsvi
Apr 10 2017 02:57
Happy to help
Omar Ibarra
@marberra24
Apr 10 2017 02:57
yes but that changes all of the color
how do i do the affect in the example?
Saboor Malik
@MathematicsCoding
Apr 10 2017 02:58
You can just change the background color to anything except black
If you change it to black that will affect text because they are black
But you can always change the text color
body {background-color: color;}
Inside css
@SkyCoder01 You said you are college student
You major in CS?
Gulsvi
@gulsvi
Apr 10 2017 03:00

@marberra24 For all of the text you want with a different background color, put it in a <div></div>

<div class="gray-background">
  the content you want with a gray background
</div>

Then in your CSS, use

.gray-background {
  background-color: gray;
}
@MathematicsCoding No, linguistics
Still trying to translate what he said about non-muslims above. Hope I didn't offend by replying in arabic...
Saboor Malik
@MathematicsCoding
Apr 10 2017 03:01
The study of languages
Mohamed Derhalli
@derhallim
Apr 10 2017 03:01
"cascading"
Saboor Malik
@MathematicsCoding
Apr 10 2017 03:01
Interesting
manjotkaurghuman
@manjotkaurghuman
Apr 10 2017 03:01
hi everone, please help me . how to build a tribute page
Mohamed Derhalli
@derhallim
Apr 10 2017 03:01
@SkyCoder01 u speak arabic?
Saboor Malik
@MathematicsCoding
Apr 10 2017 03:01
@SkyCoder01 Are you going to create an app that translate any language to other?
That would be cool
Gulsvi
@gulsvi
Apr 10 2017 03:01
no, I just know a few words
manjotkaurghuman
@manjotkaurghuman
Apr 10 2017 03:02
means from where should i start
Gulsvi
@gulsvi
Apr 10 2017 03:02
@MathematicsCoding Maybe some day :)
Saboor Malik
@MathematicsCoding
Apr 10 2017 03:02
@manjotkaurghuman You can pick any person to write about them
Mohamed Derhalli
@derhallim
Apr 10 2017 03:02
@SkyCoder01 i thought u studied the dictionary page by page, and applied the words on codepen for fun :P
Saboor Malik
@MathematicsCoding
Apr 10 2017 03:02
Just do the designs whatever you do
Gulsvi
@gulsvi
Apr 10 2017 03:02
@derhallim lol, yes, that too and shampoo bottle literature
Mohamed Derhalli
@derhallim
Apr 10 2017 03:02
hahaha yea
@SkyCoder01 @MathematicsCoding where r u from
Saboor Malik
@MathematicsCoding
Apr 10 2017 03:03
pak
Mohamed Derhalli
@derhallim
Apr 10 2017 03:03
cool
Gulsvi
@gulsvi
Apr 10 2017 03:03
Canada here
Mohamed Derhalli
@derhallim
Apr 10 2017 03:03
@SkyCoder01 me too
jordan originally, but moved to canada
Gulsvi
@gulsvi
Apr 10 2017 03:04
Cool :)
Johnny
@jtan3
Apr 10 2017 03:04
@SkyCoder01 besides FCC what else are you using to learn?
Mohamed Derhalli
@derhallim
Apr 10 2017 03:04
@SkyCoder01 East/West?
Gulsvi
@gulsvi
Apr 10 2017 03:04
I'm in BC
Saboor Malik
@MathematicsCoding
Apr 10 2017 03:04
My sister is first one of my entire family to born in US
Alexander Auguste
@Digital920
Apr 10 2017 03:04
Trying to post an image element can anyone tell why it isn't working? https://codepen.io/Lazarus155/pen/XMLwPw
Mohamed Derhalli
@derhallim
Apr 10 2017 03:04
that's East then :joy_cat:
Gulsvi
@gulsvi
Apr 10 2017 03:05
@jtan3 Just a weekly javascript meetup and I go through the documentation line by line
Saboor Malik
@MathematicsCoding
Apr 10 2017 03:05
@Digital920 You have a degree in engineering?
Gulsvi
@gulsvi
Apr 10 2017 03:05
lol @derhallim West coast :)
Mohamed Derhalli
@derhallim
Apr 10 2017 03:05
@SkyCoder01 documentation for what exactly, other than jQuery
Alexander Auguste
@Digital920
Apr 10 2017 03:05
@MathematicsCoding nope
Saboor Malik
@MathematicsCoding
Apr 10 2017 03:05
oh
Gulsvi
@gulsvi
Apr 10 2017 03:05
MDN for JavaScript and CSS
Saboor Malik
@MathematicsCoding
Apr 10 2017 03:06
<img src="url" alt="Error" target="_blank">
Example ^^
To post an img on page or make the img as a background?
Omar Ibarra
@marberra24
Apr 10 2017 03:07
@SkyCoder01 how do i get rid of the white spaces in between the elements?
Saboor Malik
@MathematicsCoding
Apr 10 2017 03:07
If background
body {background-img: url("url here");}
image not img
Mohamed Derhalli
@derhallim
Apr 10 2017 03:07
make sure it's a responsive image so ur whole design becomes responsive
:joy_cat:
Saboor Malik
@MathematicsCoding
Apr 10 2017 03:08
@derhallim how.. :(
Johnny
@jtan3
Apr 10 2017 03:08
@SkyCoder01 thanks.
CamperBot
@camperbot
Apr 10 2017 03:08
jtan3 sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:cookie: 960 | @skycoder01 |http://www.freecodecamp.com/skycoder01
Gulsvi
@gulsvi
Apr 10 2017 03:08
@marberra24 use one <div class="gray-background"> to cover all the content
Mohamed Derhalli
@derhallim
Apr 10 2017 03:08
@MathematicsCoding that was sarcasm man :'(
Saboor Malik
@MathematicsCoding
Apr 10 2017 03:08
sorry
Gulsvi
@gulsvi
Apr 10 2017 03:08
@jtan3 The javascript meetup is really the most helpful for me.
Saboor Malik
@MathematicsCoding
Apr 10 2017 03:09
@SkyCoder01 How long have you doing on weather app?
I heard you did it for few weeks?
Gulsvi
@gulsvi
Apr 10 2017 03:09

@marberra24 Like:

  <div class="gray-background">
    <p>
      <font size=11>
        <center> Dr. Norman Borlaug </center>
      </font>
    </p>
    <font size=5> <i><b>
    <center> <p> The man who saved a billion lives </center></b></i></p>
    </font>
  </div>

instead of:

    <div class="gray-background">
    <p> <font size=11> <center>  Dr. Norman Borlaug </center> </font> </p>
  </div>

  <div class="gray-background"> 
    <font size=5> <i><b>
    <center> <p> The man who saved a billion lives </center></b></i></p></font> 
</div>
@MathematicsCoding It took me maybe 30 hours
Saboor Malik
@MathematicsCoding
Apr 10 2017 03:09
inline styles?
I see
Mohamed Derhalli
@derhallim
Apr 10 2017 03:10
u should really attend the discussions in the main chat room :'(
Saboor Malik
@MathematicsCoding
Apr 10 2017 03:10
I saw yours
Its nice
Gulsvi
@gulsvi
Apr 10 2017 03:10
Thank you
It's under development again though lol
Johnny
@jtan3
Apr 10 2017 03:11
What can i expect from meetups? I would feel too intimidated based on my skills @SkyCoder01
Saboor Malik
@MathematicsCoding
Apr 10 2017 03:11
@SkyCoder01 lol
Omar Ibarra
@marberra24
Apr 10 2017 03:11
thanks @SkyCoder01
CamperBot
@camperbot
Apr 10 2017 03:11
marberra24 sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:cookie: 961 | @skycoder01 |http://www.freecodecamp.com/skycoder01
Gulsvi
@gulsvi
Apr 10 2017 03:12
@jtan3 I think your skills are great for those meetups, at least from the few projects I've seen. I mean, I didn't know anything when I went to one the first time :)
@marberra24 no problem :)
People are usually very helpful and want to teach others, at least in my experience
Saboor Malik
@MathematicsCoding
Apr 10 2017 03:13
@SkyCoder01 you know random quote machine?
How did you do it like click on page then quote changes each click
Without button
Gulsvi
@gulsvi
Apr 10 2017 03:14
@MathematicsCoding You can use jQuery .click() on any element
Mohamed Derhalli
@derhallim
Apr 10 2017 03:14
Saboor Malik
@MathematicsCoding
Apr 10 2017 03:14
is that class
@derhallim dang thats nice
Gulsvi
@gulsvi
Apr 10 2017 03:14
.click() is a method
Mohamed Derhalli
@derhallim
Apr 10 2017 03:14
not responsive though
Saboor Malik
@MathematicsCoding
Apr 10 2017 03:15
Ha!
Gulsvi
@gulsvi
Apr 10 2017 03:15
Must make website responsive
Alexander Auguste
@Digital920
Apr 10 2017 03:15
@MathematicsCoding body{
font-family: arial, sans-serif;
text-align: center;
background-img: url ("http://famouswonders.com/wp-content/uploads/2009/04/new-york-skyline-at-night.jpg");} Ok I tried implementing this code as a background img but it isn't showing up, are there any problems I need to fix over here?
Mohamed Derhalli
@derhallim
Apr 10 2017 03:15
yea
it's responsive to a certain size
Gulsvi
@gulsvi
Apr 10 2017 03:15
lol
Saboor Malik
@MathematicsCoding
Apr 10 2017 03:15
@Digital920 image not img lol
Gulsvi
@gulsvi
Apr 10 2017 03:15
It's responsive as long as you don't change the screen size
Mohamed Derhalli
@derhallim
Apr 10 2017 03:16
yea which is sufficient
Gulsvi
@gulsvi
Apr 10 2017 03:16
background-image
Saboor Malik
@MathematicsCoding
Apr 10 2017 03:16

@SkyCoder01

@Digital920 image not img lol

:(
Mohamed Derhalli
@derhallim
Apr 10 2017 03:16
product release notes: works only on chrome/firefox, windows 8/10, dell laptops
Saboor Malik
@MathematicsCoding
Apr 10 2017 03:17
@derhallim what are you talking about?
Mohamed Derhalli
@derhallim
Apr 10 2017 03:17
my quote machine specs :'(
Saboor Malik
@MathematicsCoding
Apr 10 2017 03:17
oh
Gulsvi
@gulsvi
Apr 10 2017 03:18
@Digital920 I'm not sure if you saw the response from @MathematicsCoding it's
background-image: url ("http://famouswonders.com/wp-content/uploads/2009/04/new-york-skyline-at-night.jpg");
Saboor Malik
@MathematicsCoding
Apr 10 2017 03:19
I think hes pissed off
Just because I typed img but I said "image not img" after that
eh..
Mohamed Derhalli
@derhallim
Apr 10 2017 03:19
na i don't think so
Saboor Malik
@MathematicsCoding
Apr 10 2017 03:20
:cry: :gun:
Im sorry

SHOT

Mohamed Derhalli
@derhallim
Apr 10 2017 03:20
beer shot
:'(
Tanushree Samanta
@TSamanta
Apr 10 2017 03:20
hey! I wanted to change the language of my content by simply changing the URL which I am pulling from wikipedia using a drop down menu. should I use switch ? and how to give the choice to switch? via ID or class?
Mohamed Derhalli
@derhallim
Apr 10 2017 03:20
i hate it when it's crowded in a chat room
Saboor Malik
@MathematicsCoding
Apr 10 2017 03:20
:sparkles: :up: heaven
Im back
God just recreated me
Tanushree Samanta
@TSamanta
Apr 10 2017 03:21
?
Saboor Malik
@MathematicsCoding
Apr 10 2017 03:21
Or should I say Allah?
Mohamed Derhalli
@derhallim
Apr 10 2017 03:21
umm
Alexander Auguste
@Digital920
Apr 10 2017 03:21
@MathematicsCoding I'm not mad lol I'm just trying to fix the code
Mohamed Derhalli
@derhallim
Apr 10 2017 03:21
i think u should pass the language with the url?
Saboor Malik
@MathematicsCoding
Apr 10 2017 03:21
@Digital920 lol I was joking xD
Tanushree Samanta
@TSamanta
Apr 10 2017 03:21
:clap: @MathematicsCoding
Mohamed Derhalli
@derhallim
Apr 10 2017 03:22
so for example, this is the url
"https://en.wikipedia.org/w/api.php?action=query&format=json&prop=extracts&revids=&generator=search&exsentences=1&exlimit=max&exintro=1&gsrsearch="
u would replace the "en" with the language name, without doing switch or anything
Saboor Malik
@MathematicsCoding
Apr 10 2017 03:22
www.google.com is also an example ya know?
Mohamed Derhalli
@derhallim
Apr 10 2017 03:22
so the dropdown will contain name/value, the name is English, value is en, French, fr, and so on
Tanushree Samanta
@TSamanta
Apr 10 2017 03:22
yeah but the user is suppose to choose the language
yeah i will do that
Mohamed Derhalli
@derhallim
Apr 10 2017 03:23
yea, when the user chooses the language, u pass it to the url
Tanushree Samanta
@TSamanta
Apr 10 2017 03:23
but the url should change accordingly
Mohamed Derhalli
@derhallim
Apr 10 2017 03:23
yep
u'll format the url based on the user selected dropdown option
Tanushree Samanta
@TSamanta
Apr 10 2017 03:23
so for each choice I was planning like
switch{
Mohamed Derhalli
@derhallim
Apr 10 2017 03:23
ah no
Tanushree Samanta
@TSamanta
Apr 10 2017 03:23
ughh sorry
Mohamed Derhalli
@derhallim
Apr 10 2017 03:24
u'll have like 30 case:
plus 30 options in the ddl
Tanushree Samanta
@TSamanta
Apr 10 2017 03:24
nope I just want 10
so what do you suggest
Mohamed Derhalli
@derhallim
Apr 10 2017 03:24
yea, add them to the dropdown list
Tanushree Samanta
@TSamanta
Apr 10 2017 03:24
what should i do
Mohamed Derhalli
@derhallim
Apr 10 2017 03:24
<option>
add them to the dropdown list, u r going to add them anyway so the user chooses from them
and add value for each option
then in ur button click, u get that select value, and concat the url
Tanushree Samanta
@TSamanta
Apr 10 2017 03:26
what was I thing
*thinking
let the value be like
for english=en
Mohamed Derhalli
@derhallim
Apr 10 2017 03:26
 <select name="langs">
    <option value="en">English</option>
Tanushree Samanta
@TSamanta
Apr 10 2017 03:26
and let that get concatenated
yeah
thanks man! @derhallim
CamperBot
@camperbot
Apr 10 2017 03:27
tsamanta sends brownie points to @derhallim :sparkles: :thumbsup: :sparkles:
:cookie: 167 | @derhallim |http://www.freecodecamp.com/derhallim
Mohamed Derhalli
@derhallim
Apr 10 2017 03:27
ur welcome!
Sky left? :O
Saboor Malik
@MathematicsCoding
Apr 10 2017 03:28
NO he is still here
Type @
Maybe inactive?
Mohamed Derhalli
@derhallim
Apr 10 2017 03:29
ah maybe, didn't show up right away in the list
@MathematicsCoding what time is it there?
Saboor Malik
@MathematicsCoding
Apr 10 2017 03:30
Here?
Mohamed Derhalli
@derhallim
Apr 10 2017 03:30
yea
Saboor Malik
@MathematicsCoding
Apr 10 2017 03:30
8pm
Mohamed Derhalli
@derhallim
Apr 10 2017 03:30
where r u?!!
Saboor Malik
@MathematicsCoding
Apr 10 2017 03:30
Under pacific ocean
The truth is
Im fishman
Mohamed Derhalli
@derhallim
Apr 10 2017 03:30
:'(
thought ur in pak
Saboor Malik
@MathematicsCoding
Apr 10 2017 03:30
Like I said god recreated me but not as a human
Nah Im from pak
Mohamed Derhalli
@derhallim
Apr 10 2017 03:31
yea so ur in LA/san francisco/san diego / all of these areas
best weather in the region
Saboor Malik
@MathematicsCoding
Apr 10 2017 03:31
Yeah
Mohamed Derhalli
@derhallim
Apr 10 2017 03:31
:'(
Saboor Malik
@MathematicsCoding
Apr 10 2017 03:31
Not really
Really cold at night lol
Mohamed Derhalli
@derhallim
Apr 10 2017 03:32
san diego has the BEST weather man
Saboor Malik
@MathematicsCoding
Apr 10 2017 03:32
Eh
Mohamed Derhalli
@derhallim
Apr 10 2017 03:32
then come to Montreal, let's see what u think :'(
Saboor Malik
@MathematicsCoding
Apr 10 2017 03:33
lol
Where is that?
Mohamed Derhalli
@derhallim
Apr 10 2017 03:33
canada
Saboor Malik
@MathematicsCoding
Apr 10 2017 03:33
oh
Its snowy there
Mohamed Derhalli
@derhallim
Apr 10 2017 03:33
yea
but now no
but it gets like -35
-30
and u don't like san diego's weather :'(
i come and go to ottawa/new york
so travelling between these cities
all same weather
Saboor Malik
@MathematicsCoding
Apr 10 2017 03:35
Jeez
Mohamed Derhalli
@derhallim
Apr 10 2017 03:39
see u man, nice talking to u @MathematicsCoding
good night @SkyCoder01
Saboor Malik
@MathematicsCoding
Apr 10 2017 03:40
You too @derhallim
Night guys
Sanford Banks
@sbanks77
Apr 10 2017 03:56

@sbanks77

function wordBlanks(myNoun, myAdjective, myVerb, myAdverb) {
var result = "The was not but __ down the street";
// Your code below this line
myNoun = dog;
myAdjective = big;
myVerb = ran;
myAdverb = quickly;
// Your code above this line
return result;
}

// Change the words here to test your function
wordBlanks("myNoun", "myAdjective", "myVerb", "myAdverb");
can anyone help me withe mad lib challenege
???

Chris Cullen
@123xylem
Apr 10 2017 03:58

My DropDown Menu wont dropdown.. ANy ideas why?

<html>


    <head>


    <script   src="https://code.jquery.com/jquery-3.2.1.min.js"   integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4="   crossorigin="anonymous"></script>

    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
  <link href="https://fonts.googleapis.com/css?family=Lobster+Two:400i" rel="stylesheet">


        <link rel="stylesheet" href="/stylesheets/main.css">

        <title>EvolvesAware</title>
     </head>
       <body>

My header head

<div class="dropdown navbar-nav navbar-right dropdown show">
  <button class="btn btn-success show dropdown-toggle" type="button" data-toggle="dropdown">Dropdown Example
  <span class="caret"></span></button>
  <ul class="dropdown-menu">
    <li><a href="#">HTML</a></li>
    <li><a href="#">CSS</a></li>
    <li><a href="#">JavaScript</a></li>
  </ul>
</div>

My dropdown menu
The button shows but does nothing when clicked> Why doesnt the dropdown work?

Ken Haduch
@khaduch
Apr 10 2017 04:08
Have you included the jquery.js and bootstrap.js libs? @123xylem
If you're using bootstrap, that is
Chris Cullen
@123xylem
Apr 10 2017 04:09
@khaduch I just have the links in my header head
 <script   src="https://code.jquery.com/jquery-3.2.1.min.js"   integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4="   crossorigin="anonymous"></script>

    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
Ken Haduch
@khaduch
Apr 10 2017 04:11
@123xylem - you need the JavaScript files, too. Jquery and bootstrap.js
Chris Cullen
@123xylem
Apr 10 2017 04:13

@khaduch

<script   src="https://code.jquery.com/jquery-3.2.1.min.js"   integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4="   crossorigin="anonymous"></script>
   <link href="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js">


  <link rel "js/text"href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js">

    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">

I now have the .js links but still no worky

Ken Haduch
@khaduch
Apr 10 2017 04:14
@123xylem - do you have this in a CodePen project, or are you working locally?
Ken Haduch
@khaduch
Apr 10 2017 04:15
@sbanks77 - you are resetting the function variables (the function arguments) within your code, you cannot do that, you should be using those variables within your code to compose the string.
Sanford Banks
@sbanks77
Apr 10 2017 04:17
@khaduch so in the statement I would use "myNoun instead of the underlines?
Ken Haduch
@khaduch
Apr 10 2017 04:19
@123xylem - right clicking on the page (using FireFox) and selecting "View Page Source" shows a few things highlighted in red - different errors that are indicating missing spaces, etc.
@sbanks77 - you want to go back to the original code, I would advise resetting your page. Within the function, you have access to the variables myNoun, myVerb, etc. You are to take those variables, and use string concatenation to make a sentence - something like result = myNoun + ' ' + myVerb etc.
Ken Haduch
@khaduch
Apr 10 2017 04:28
@123xylem - I'm looking at this page - I didn't realize that you weren't talking about the collapsed navbar, but the dropdown on the navbar - this page: https://getbootstrap.com/javascript/#dropdowns indicates that you need a dropdown.js plugin to make the dropdowns work... so that might be what's missing?
Chris Cullen
@123xylem
Apr 10 2017 04:30
@khaduch hmm i dont see where it says that but i can try adding it
I really liked this pen
so for experiment purposes I was trying it with different languages
like changing the en to hi for hindi
Ken Haduch
@khaduch
Apr 10 2017 04:35
@123xylem - I don't think that you have the proper link to include the bootstrap.min.js? You should have this: <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> or something like it. You have a <link element which is for loading stylesheets, I think?
Tanushree Samanta
@TSamanta
Apr 10 2017 04:35
but it wasn't giving me the description
and if I was trying to use select and then tried to concat it with the url
even that wasn't working
Chris Cullen
@123xylem
Apr 10 2017 04:36
@khaduch U got it
thanks
@khaduch thanks
CamperBot
@camperbot
Apr 10 2017 04:36
123xylem sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 2719 | @khaduch |http://www.freecodecamp.com/khaduch
Ken Haduch
@khaduch
Apr 10 2017 04:37
@123xylem - great! good luck...
Sanford Banks
@sbanks77
Apr 10 2017 04:37

@khaduch function wordBlanks(myNoun, myAdjective, myVerb, myAdverb) {
var result = "";
// Your code below this line
myNoun = dog;
myAdjective = big;
myVerb = ran;
myAdverb = quickly;
result = "The" + myNoun + "was" + myAdjective + "but" + myVerb + "down the street" + myAdverb.

// Your code above this line
return result;
}

heroiczero
@heroiczero
Apr 10 2017 04:39

why do you have

myNoun = dog;
myAdjective = big;
myVerb = ran;
myAdverb = quickly;

you already have parameters for it here function wordBlanks(myNoun, myAdjective, myVerb, myAdverb)

Sanford Banks
@sbanks77
Apr 10 2017 04:39
@heroiczero I thought we had to make it known what was what
heroiczero
@heroiczero
Apr 10 2017 04:40
@sbanks77 "The" + myNoun + "was" + myAdjective + "but" + myVerb + "down the street" + myAdverb. making some mistakes here you need "spaces" and the . needs "" and you need to end it with a ;
@sbanks77 right now the result is returning one long word that is not even a word.
@sbanks77 you do not need it because you can call the function with parameters by wordBlanks( dog, big, ran, quickly) and it will return a sentence if you correct your code for the sentence, so it is a sentence with " " spaces
Mychal Simka
@msimka
Apr 10 2017 04:44
@sbanks77 When it says change the values to check the result, it means to change them in the last line on the page, not inside the function. If you change them inside the function, then your arguments cease to be variables and you will always return the same thing i.e. dog, big, ran, quickly The purpose of a function is like Mad Libs. It should work on anything and produce a different result depending on what you input to it.
Sanford Banks
@sbanks77
Apr 10 2017 04:45
ok so I still get an error with the code below

function wordBlanks(myNoun, myAdjective, myVerb, myAdverb) {
var result = "";
// Your code below this line

result = "The" + myNoun + "was" + myAdjective + "but" + myVerb + "down the street" + myAdverb " .";

// Your code above this line
return result;
}

// Change the words here to test your function
wordBlanks("dog", "big", "ran", "quickly");

@msimka @heroiczero
Mychal Simka
@msimka
Apr 10 2017 04:46
@sbanks77 You're missing a + towards the end
heroiczero
@heroiczero
Apr 10 2017 04:46
@sbanks77 result = "The " + myNoun + " was " + myAdjective + " but " + myVerb + " down the street " + myAdverb + " .";
Sanford Banks
@sbanks77
Apr 10 2017 04:47
wow
Mychal Simka
@msimka
Apr 10 2017 04:47
@heroiczero You are also missing the + sign lol
NM
Sanford Banks
@sbanks77
Apr 10 2017 04:47
lol I got it
kudos @msimka
kudos @heroiczero
kudos @khaduch
Mychal Simka
@msimka
Apr 10 2017 04:48
@sbanks77 Nice
Sanford Banks
@sbanks77
Apr 10 2017 04:48
thank you @msimka @heroiczero @khaduch
CamperBot
@camperbot
Apr 10 2017 04:48
sbanks77 sends brownie points to @msimka and @heroiczero and @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 1116 | @heroiczero |http://www.freecodecamp.com/heroiczero
:cookie: 312 | @msimka |http://www.freecodecamp.com/msimka
:star2: 2720 | @khaduch |http://www.freecodecamp.com/khaduch
Sanford Banks
@sbanks77
Apr 10 2017 04:50
the smallest things really do matter
Mychal Simka
@msimka
Apr 10 2017 04:57
@sbanks77 Yes. I have a pretty strong background in foreign languages, and the main difference I found between them and programming languages is that if you forget even one punctuation mark, then you're entire sentence, paragraph, conversation becomes meaningless. It's cool and not at the same time haha
They become easier to spot though, and you learn to scan for them through muscle memory almost
Another way to look at it is there is no second place in coding. Because it's binary, it's only win or lose.
Mychal Simka
@msimka
Apr 10 2017 05:02
But if you look at what we are doing, which is routing electrical currents, then it becomes pretty cool I think. The difference between touching the wrong wire in your breaker box, and not, is also binary.
I found this pen
I wanted to add some other languages
but I am not getting thecontent in the same langugae
like Arabic or Chinese
Mychal Simka
@msimka
Apr 10 2017 05:18
@TSamanta There should be UTF codes for other languages which can be manipulated in your javascript
Tanushree Samanta
@TSamanta
Apr 10 2017 05:18
yes I did change those
like ar for arabic
in the url
try doing it
it did not work for me atleast
Mychal Simka
@msimka
Apr 10 2017 05:24
@TSamanta I'm reading the javascript file and realizing how little of it I understand, even after having completed the entire Front End course at freecodecamp lol
There was very little on the transactions between the dynamic javascript and static HTML and CSS, which is a major downfall of the freecodecamp curiculum. I can solve almost any algorithm in javascript now, but fail to understand simple javascript/HTML transactions like what this codepen is doing :worried:
Johnny
@jtan3
Apr 10 2017 05:31
@msimka you have the front end cert?
Mychal Simka
@msimka
Apr 10 2017 05:32
I skipped the projects @jtan3 just did the challenges but yes I completed them all
Used all my own code
Johnny
@jtan3
Apr 10 2017 05:32
@msimka why not start doing the projects?
Mychal Simka
@msimka
Apr 10 2017 05:33
@jtan3 I did, and finished about 5 of them, but there's literally no instruction. It just says, Go do this, and tells you nothing about HOW to do it
Johnny
@jtan3
Apr 10 2017 05:35
@msimka There's videos on youtube of people doing these projects. Maybe it can help you understand better.
Duy khanh
@buiduykhanh
Apr 10 2017 05:37
i have done my portfolio anyone can feedback my portfolio ? i think a have some problem in responsive :(
http://codepen.io/buiduykhanh/full/MpMNYe/
Tanushree Samanta
@TSamanta
Apr 10 2017 05:40
@msimka same here :( and seeing the way go all into pro mode in simple html css scares the shit out of me
Mychal Simka
@msimka
Apr 10 2017 05:40
@jtan3 Yes, but there is other more readily available knowledge which I can explore faster than the hunting and gathering information like they did in the 60's. Everything is moving to applications now, and specifically mobile apps, so I'm going down the node path, with a goal of React/React-Native. Hopefully these simple JS/HTML transactions will fill themselves in along the way, along with a more functional handle of CSS/flexbox etc.
nodeschool.io for example is just like the freecodecamp challenges
and goes quite deep, even through redux
@TSamanta the issue is in the tutorial structure, not in your learning velocity. That's why I'm exploring alternative routes
Tanushree Samanta
@TSamanta
Apr 10 2017 05:46
same here
Mychal Simka
@msimka
Apr 10 2017 06:00
@TSamanta I was thinking there should be a book like the 13 Elements of Euclid written for computer science. It would really clear a lot of things up
Tanushree Samanta
@TSamanta
Apr 10 2017 06:01
I am doing my cs in a god damn school and I am still clueless af
Mychal Simka
@msimka
Apr 10 2017 06:19
@TSamanta I hate schools lol
I am not able to change the language based on the input I had even used a variable to store
the value
it still gives no value
Spyrantis Theodoros
@thodorisanta
Apr 10 2017 08:12

im working on the tic tac toe project and this is my work so far. How should i continue? And how should i make the tic tac toe "borders" ?

http://codepen.io/oshikurou/pen/dvEOOX?editors=1111

Harsh Chandra
@HarshHC
Apr 10 2017 08:29
I need someone to help me with some JS in a practice project I was making
Mychal Simka
@msimka
Apr 10 2017 08:29
@HarshHC whats up
Harsh Chandra
@HarshHC
Apr 10 2017 08:29
@msimka can I talk to u in private chat , coz this may take time and will fill up public chat while explaining
Mychal Simka
@msimka
Apr 10 2017 08:35
@HarshHC sure
Tomas
@tomasale
Apr 10 2017 09:24
Hi, can anyone tell me why CSS code couldnt work in wordpress blog? Etc if i change height in .css file and save it, but then reloaded nothing changes, using chrome i can inspect code and it shows old one. I dont get it, previously it worked fine, what i did wrong?
alpox
@alpox
Apr 10 2017 09:26
@tomasale clear your browser cache and reload the page then again
Tomas
@tomasale
Apr 10 2017 09:33
thanks alpox it did help, I totally forgot about cache, now website looks like salad :D
Tanushree Samanta
@TSamanta
Apr 10 2017 09:48
hi!
Heathercoraje
@Heathercoraje
Apr 10 2017 09:48
hi :)
Marlon
@mblmarlon
Apr 10 2017 09:48
@alpox looks good for the moment!
Heathercoraje
@Heathercoraje
Apr 10 2017 09:49
uhm does anyone has a minute to look at my code?
Marlon
@mblmarlon
Apr 10 2017 09:49
sure
Tanushree Samanta
@TSamanta
Apr 10 2017 09:49
I was trying to add autocomplete to my searchbox
Heathercoraje
@Heathercoraje
Apr 10 2017 09:49
i am trying to make give hover effect
Tanushree Samanta
@TSamanta
Apr 10 2017 09:49
but
when i put it it says
Heathercoraje
@Heathercoraje
Apr 10 2017 09:49
my hmtl
<div class="aboutimage">
<img class="aboutimage" src="https://s12.postimg.org/unpf1d3wd/1143.jpg">
</div>
css
Tanushree Samanta
@TSamanta
Apr 10 2017 09:50
Unexpected token function
Heathercoraje
@Heathercoraje
Apr 10 2017 09:50
.aboutimage {
margin: 40px auto 40px auto;
width: 500px;
height: 500px;
border-radius: 50%;
}
.aboutimage: hover {
content: url(https://s29.postimg.org/fzpzzt0qf/260.jpg);
width: 500px;
height: 500px;
border-radius: 50%;
}
Tanushree Samanta
@TSamanta
Apr 10 2017 09:50
this is the error it shows
Heathercoraje
@Heathercoraje
Apr 10 2017 09:50
my pic hahaha
Tanushree Samanta
@TSamanta
Apr 10 2017 09:50
:cry:
Mychal Simka
@msimka
Apr 10 2017 09:50
@TSamanta what other tutorial series/platforms are you using to learn frontend?
Tanushree Samanta
@TSamanta
Apr 10 2017 09:50
honestly you might call me outdated but I am reading books
to make my base rock solid
Heathercoraje
@Heathercoraje
Apr 10 2017 09:51
@mblmarlon my code doesn't give hover effect. I am not sure why
Tanushree Samanta
@TSamanta
Apr 10 2017 09:51
@Heathercoraje did you add animate.css?
Heathercoraje
@Heathercoraje
Apr 10 2017 09:51
No..
kirbyedy
@kirbyedy
Apr 10 2017 09:51
not sure animate.css is necasssary in this case
Bas
@Aliaselias
Apr 10 2017 09:52
it's not necassery
@Heathercoraje Instead of giving it the content
why not change the background image
?
kirbyedy
@kirbyedy
Apr 10 2017 09:52
but I am wondering if its a good practice to have your class same name
div and image, maybe that is causing the problem
Bas
@Aliaselias
Apr 10 2017 09:52
The div and image should indeed not have the same class.
Heathercoraje
@Heathercoraje
Apr 10 2017 09:52
@Aliaselias If I am honest I don't know how
Bas
@Aliaselias
Apr 10 2017 09:53
@Heathercoraje First change the classes on the div to something else than the aboutimage
Heathercoraje
@Heathercoraje
Apr 10 2017 09:53
ok.
Tanushree Samanta
@TSamanta
Apr 10 2017 09:53
yeah and I dunno you could use an event listener
to get the hover effect
have you dont the jQuery?
*done
course
Bas
@Aliaselias
Apr 10 2017 09:54
.aboutimage:hover{ background: url('your link'); height: 500px; width: 500px; border-radius: 25%; }
Heathercoraje
@Heathercoraje
Apr 10 2017 09:55
@Aliaselias thanks let me try for a sec
CamperBot
@camperbot
Apr 10 2017 09:55
heathercoraje sends brownie points to @aliaselias :sparkles: :thumbsup: :sparkles:
:cookie: 32 | @aliaselias |http://www.freecodecamp.com/aliaselias
Clyde Lobo
@oppiniated