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
Nate Mallison
@NJM8
I have a question for those that have completed the wikipedia viewer. How did you deal with the random api being completely different from the search api
Corey Lewis
@cursiv3
I hooked the route for the random one into it
it's own button if I remember correctly
Nate Mallison
@NJM8
I've got my page pretty much done except the random part.
I could easily just make a button to open a new random page. But it would be nice to get it integrated into my style and display 8 random pages
but the api call is really different, so I assume the data back will be as well.
Corey Lewis
@cursiv3
Yeah I just had that link open to a random page, didn't try to return a random list
you could just query a random word API and put that into your search param for the normal wiki api query
Nate Mallison
@NJM8
I was thinking of that too, that's a good idea
Yup, going to go that route, one or two more simple functions and it's done. I don't want to kill myself on this thing.
Corey Lewis
@cursiv3
That's the best way for everything really haha
I had so many times where I did something clever and came back to it a month or two later and was just so confused as to what I'd done
Nate Mallison
@NJM8
Yeah, it doesn't help that I couldn't figure out the media wiki api (not great documentation imho), so I stole someone else's api call and make my app work around it. It still get's exactly what I wanted. Just not sure how to get something different working
I don't know why the media wiki's docs look like greek to me. I've done several other projects to with various api's no problem.
Corey Lewis
@cursiv3
well if it makes you feel better I did that like a year ago but VIVIDLY remember the frustration of trying to figure out how the hell to use it
luckily pretty much every other API is pretty straightforward and well documented heh
niniyzni
@niniyzni
  • when I click id ="edit" a modal popup opens up.
  • in that popup there is a text box.
  • when I enter some value, it should update in the select drop down menu.
  • not sure how to do it providing my code below.
http://jsfiddle.net/t0thcho8/
  $("#edit").click(function() {
     alert("I am here");

     $("#win1Edit").show().kendoWindow({
       width: "300px",
       height: "500px",
       modal: true,
       title: "Window 1"
     });
   });

   $("#win1Submit").click(function() {
     alert("win1Submit I am here");
   });
Stephen James
@sjames1958gm
@niniyzni If there is an input element you can hang on the on change event and get the value of the input element
niniyzni
@niniyzni
@sjames1958gm hi, can you update in my fiddle
Stephen James
@sjames1958gm
@niniyzni Sorry I am at work, so I was only able to take a quick look
Ian Lee
@asparism
@niniyzni - i'm not sure if you have a workflow you're trying to stick with already, but i was able to get the result you were looking for by adding id attributes to the add/edit element and the select element.
then i used the value of the input to make a new option element and added it as a child to the select element.
niniyzni
@niniyzni
@asparism @sjames1958gm thanks
CamperBot
@camperbot
niniyzni sends brownie points to @asparism and @sjames1958gm :sparkles: :thumbsup: :sparkles:
:cookie: 340 | @asparism |http://www.freecodecamp.org/asparism
:star2: 9097 | @sjames1958gm |http://www.freecodecamp.org/sjames1958gm
niniyzni
@niniyzni

hi,

  • I used local storage to retain the drop down values.
  • but the values are not retaining in the drop down after I refresh the page.
  • can you tell me how to fix it.
  • providing my code below.

http://jsfiddle.net/ppkykr2h/8/


   $("#win1Submit").click(function() {

     var testingMickey = $("#mickey").val();
     alert("win1Submit I am here--->" + testingMickey);
     document.getElementById('cars').options[0].text = testingMickey;

     var someVarName = testingMickey;
         localStorage.setItem("someVarName", testingMickey);

     var getItemsomeVarName1 = localStorage.getItem("someVarName");
     alert("getItemsomeVarName1 I am here--->" + getItemsomeVarName1);


     $("#win1").data("kendoWindow").close();

   });
Brad
@bradtaniguchi
@niniyzni If your saving the current value of testingMickey before you get the item, you probably overwrite the original value no?
DarkxPunk
@DarkxPunk
Im back on here, anyone wanna help me perfect my pure css hide/show system?
Ian Lee
@asparism
@niniyzni - i think you may want to determine whether you will add multiple items. in that case, you might want to store an array in local storage. if that's the case, you'll have to JSON.stringify to set, and JSON.parse when you get.
like @bradtaniguchi said, it looks like you're overwriting the original options, so you'll want to add a new child and append it to the parent, unless you're trying to overwrite the options
looks like you're on the right track
Dardan Demiri
@dardandmr
@DarkxPunk
Yes we can try
;)
niniyzni
@niniyzni
@asparism hey can you update in my fiddle...its confusing :(
DarkxPunk
@DarkxPunk
Dardan Demiri
@dardandmr
Yes
what's the issue ?
DarkxPunk
@DarkxPunk
@dardandmr That directed at me or @asparism ?
Dardan Demiri
@dardandmr
to you @DarkxPunk
DarkxPunk
@DarkxPunk
@dardandmr If you load the code pen I put explanations. But at the moment I am trying to optimize these as best I can to make them as flexible as possible.
Dardan Demiri
@dardandmr
hmm I can not understand exactly what you mean
Ian Lee
@asparism
@niniyzni I think it would be best if you did it yourself. That way you would understand everything because you wrote it yourself. but i will give you the outline. there are two parts: 1) - if there's not an array in localStorage, put one there, filled with the values of your select's child options. if there is an array, pull it down and JSON.parse it to javascript. every time the page loads, get that array and use it to fill the drop down menu. 2) when a new item is added, push it to the javascript array, then overwrite your local storage with the JSON.stringified javascript array.
DarkxPunk
@DarkxPunk
@dardandmr Where are you confused?
@dardandmr To clarify there is no "problem" with this. I am trying to improve one or both systems it is all.
Dardan Demiri
@dardandmr
ahh okey
I thought something is wrong in the code and when I looked inside it worked perfect
nice work
DarkxPunk
@DarkxPunk
@dardandmr So any suggestions on how to improve or meet some of the goals I have?