inherit
217348
0
Jul 27, 2022 7:26:44 GMT -8
Lynx
5,824
January 2015
msg
|
Post by Lynx on Dec 4, 2015 17:06:21 GMT -8
Okay. Using Chris's setup from the other thread I had, I'm getting a bit confused while trying to proceed. There are 3 classes listed at the top of the code: ".field1", ".field2" and ".results" - of course there, they're in the class= and don't have dots - I'm shorthanding here.
Now, User enters value into field1 in the dialog box. So I don't have to worry about matching cases, I thought I could just test the lowercase of the field to what's in the "directory". I am trying to learn on how to use the console to help me, but that still just confuses on how to test code with it. I'll have to look for a video tutorial sometime. At any rate, I couldn't find a jQuery .toLower, but I could swear (I'm an ex truck driver - I swear a lot ) I saw that used someplace, but I'll be darned if I can find it anywhere on W3S. Therefore, I'm beginning to think I'm hallucinating. Anyways, this is what I'm hoping is correct code (doubtful, but I can hope):
if ($.toLower('.field1') == $.toLower('pb.plugin.get('rp_translator').settings.rpnt.native'))
That plugin setting is ".field1". Is that right? I just need a way to have a case-INsensitive match.
Thanks!The OP of this post is a moron since he has to ask stupid questions from something that's considered a basic. Please do not feel obligated to respond.
|
|
inherit
2671
0
May 14, 2013 14:40:03 GMT -8
Peter
🐺
10,615
February 2002
peter3
|
Post by Peter on Dec 4, 2015 17:13:48 GMT -8
|
|
inherit
217348
0
Jul 27, 2022 7:26:44 GMT -8
Lynx
5,824
January 2015
msg
|
Post by Lynx on Dec 4, 2015 17:25:32 GMT -8
Point taken. Closing shop. I do thank you for the reply, Peter. It is appreciated.
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
8,986
December 2005
horace
Wormo's Mini-Profile
|
Post by Chris on Dec 4, 2015 22:16:50 GMT -8
MDN FTW!
|
|
inherit
2671
0
May 14, 2013 14:40:03 GMT -8
Peter
🐺
10,615
February 2002
peter3
|
Post by Peter on Dec 5, 2015 3:06:38 GMT -8
The OP of this post is a moron since he has to ask stupid questions from something that's considered a basic. Please do not feel obligated to respond. Am not sure how to take this comment. Whether it's a dig at me for telling you it's a "basic", or not. I also don't feel obligated to respond either, I do it as I want to help you, I enjoy it, I want you to improve. I responded with a post that had an answer for you, but also trying to give you some advice by pointing out that it's part of the very basics of JavaScript, which was my hint at saying "go learn the basics that you are missing". I have no problem answering anyone's questions, no matter how basic they are (however, I will keep pointing out that it's basic stuff that can be learnt in a few hours, and much faster than waiting for responses to those questions). I'm just pointing out that your post was a good example of someone jumping in without the "beginner basics". Throw jQuery and Plugins out the window for a day, go learn the core basics of JavaScript, it will help you later on down the road. - Comments - Variables - Operators - Strings and string manipulation (i.e .toLowerCase()) - Conditionals - Arrays and array manipulation - Functions and function arguments - Loops (for, while, do, for in) - Objects There's so much more you will be able to do once you have those in your toolbox.
In response to "he has to ask stupid questions".
"There are naive questions, tedious questions, ill-phrased questions, questions put after inadequate self-criticism. But every question is a cry to understand the world. There is no such thing as a dumb question" - Carl Sagan
en.wikipedia.org/wiki/No_such_thing_as_a_stupid_question
|
|
inherit
217348
0
Jul 27, 2022 7:26:44 GMT -8
Lynx
5,824
January 2015
msg
|
Post by Lynx on Dec 5, 2015 8:24:45 GMT -8
No, Peter, it was not meant as a dig at you at all, and I apologize if it seemed like it was. Your statement basically reminded me that I must be a moron if I'm not getting / grasping basics, and thus asking stupid questions about them. You and Chris both provide very valuable advice. I'm guessing that I'm just not smart enough to grasp it. As such, it just makes me disappointed in myself as well as realizing that I probably can't make a decent plugin - or even write decent code. I don't even know how to use the console. I tried finding that video you had done (that you had posted in Support) when you were having issues with (I think) values being concatenated instead of being incremented - or something like that - as that showed you working in the console. I just feel like I've reached that point to where I need to stop bothering you, Chris, Todge, Tumbleweed, David, Brian, Tim, Pastuleo, Azayles (and any other I may have forgotten to add to this list) with my idiotic questions. I do want to thank all of you for the help you have given me. It is appreciated and I could not have gotten this far without it. I'm not sure what the "MDN" is in the "MDN FTW", but I probably deserved it. Edit: I did put your Kitchen Sink plugin on my work forum to try and help me as well. Thank you for making that.
|
|
inherit
2671
0
May 14, 2013 14:40:03 GMT -8
Peter
🐺
10,615
February 2002
peter3
|
Post by Peter on Dec 5, 2015 10:19:41 GMT -8
Lynx , No worries. MDN FTW = developer.mozilla.org/en-US/ (aka Mozilla Developer Network For The Win). --- We know how you feel, as we have been there, that's why we are encouraging you to asks questions. The problem is that you are missing the core basics of JavaScript, without those, you will struggle. Start here: developer.mozilla.org/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScriptYou don't understand something from there that you are trying to learn? Then ask. Create a blank html file on your desktop (or do it in the console), load it in your browser, and edit the file. Write some JavaScript and test out what you are learning.
In regards to the console (F12); Learn how to inspect elements, that's really useful. Apart from that, it's just simple logging. The video you meant was this I think... www.youtube.com/watch?v=5YRanqnokRY. Here's a quick video showing where they are, and some basic things you can do. I don't use the default one in Firefox, I use Firebug, but they all do pretty much the same thing. www.youtube.com/watch?v=_lBvUrD_s50 (10th time recording that as well lol, as you can tell when I hover over the history. Stupid notifications and things ). Firebug API: getfirebug.com/wiki/index.php/Console_API
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
8,986
December 2005
horace
Wormo's Mini-Profile
|
Post by Chris on Dec 5, 2015 12:13:44 GMT -8
NO Lynx , the "MDN FTW" was only my way of showing approval for the use of an MDN reference link. I may be biased here but I remember the days when w3school was plagued with inaccurate and sometimes contradictory information so that site would not be my first choice for reference material even on how to squeeze a tube of toothpaste (despite its ranking in Google results). Their accuracy and reputation may have improved (I don't know, I simply avoid the site) but I sometimes cringe when I see a posted reference link to that domain. You seem to have missed the gist of Peter's post which is he wants you to "bother" him, and btw so do I, it is not a bother if we bother to reply (wait..wut?). Anecdotal information can help put perspective on dry clinical reference material and that's what we are offering here (call it stackoverflow for pb), but not all bases are belong to us, you need to build your own base. As a code writer yourself you know the feeling you get when someone starts asking you to do something for them without taking the time do a little legwork and do the preliminary research for themselves, I personally view that as insulting since they are asking me to invest my time into something that they want but don't have the decency to put any time or effort into the pot. In this transaction time is currency and if I'm the only one doing the spending then screw them. I'm not even asking for equal time just some indication that time has been invested so I can use that as a receipt to justify my own spending. I'm not saying the transaction in this thread is even about that since those who have previously invested into the community pot (such as yourself via a plugin or two) have "credit" that can be spent at anytime and I view Peter redirecting you to the "basic" not as request for chrono-currency but as a gentle reminder to start building your own pile of nuts (or toolbox as he put it ) so when you come across instructions on how to build something you already have the material (or tools) to complete the task. Edit: I started writing this post a couple hours ago and came back to see Peter had already responded but decided to post it anyway just because I absolutely loved that "drop the mic" moment when he quoted Sagan, OMG I genuflected before I realized what I was doing!
|
|
inherit
2671
0
May 14, 2013 14:40:03 GMT -8
Peter
🐺
10,615
February 2002
peter3
|
Post by Peter on Dec 5, 2015 13:45:29 GMT -8
The MDN is awesome, I love using it. There are good write ups, examples, and even live demos about APIs that you expect to have no real good documentation for (i.e experimental APIs). I just wish it was first result instead W3Schools
|
|
inherit
217348
0
Jul 27, 2022 7:26:44 GMT -8
Lynx
5,824
January 2015
msg
|
Post by Lynx on Dec 5, 2015 14:19:35 GMT -8
I've replaced the W3S quick bookmark (the ones under the URL bar - at least in FF) with the MDN link.
|
|
inherit
2671
0
May 14, 2013 14:40:03 GMT -8
Peter
🐺
10,615
February 2002
peter3
|
Post by Peter on Dec 5, 2015 14:26:31 GMT -8
I've replaced the W3S quick bookmark (the ones under the URL bar - at least in FF) with the MDN link. Good. You are already on your way to being a better coder after doing that If anyone else is wondering why we don't recommend W3Schools... I feel like I'm repeating what others (i.e Chris' post above) have already said, so I will just link you to a Stack Overflow post. meta.stackoverflow.com/questions/280478/why-not-w3schools-comIt's not just me and Chris, there are lots of others that prefer not to use or recommend it. www.w3fools.com/
Edit: Forgot to share another that is quite good, though haven't used it too much, I usually stick with MDN. www.webplatform.org/
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
8,986
December 2005
horace
Wormo's Mini-Profile
|
Post by Chris on Dec 6, 2015 9:55:23 GMT -8
Edit: Forgot to share another that is quite good, though haven't used it too much, I usually stick with MDN. www.webplatform.org/I ran across this domain before (possibly by reading a blog) but I never noticed the major players at the bottom of the page that are backing this project thus making it quite surprising that it hasn't taken off (still looks in very early stage). I seem to recall coming across it around 18-24 months ago at the very least. Edit:
Each of the major browsers have their own developers network but I usually find myself referencing MDN and MSDN the most (mainly because IE is usually the problem child)
|
|
inherit
2671
0
May 14, 2013 14:40:03 GMT -8
Peter
🐺
10,615
February 2002
peter3
|
Post by Peter on Dec 6, 2015 10:19:34 GMT -8
Edit: Forgot to share another that is quite good, though haven't used it too much, I usually stick with MDN. www.webplatform.org/I ran across this domain before (possibly by reading a blog) but I never noticed the major players at the bottom of the page that are backing this project thus making it quite surprising that it hasn't taken off (still looks in very early stage). I seem to recall coming across it around 18-24 months ago at the very least. I get what they are trying to do, and it's impressive that those big players are collaborating, but I just feel that it's no replacement for the Mozilla Developer Network. They really need to look at see what Mozilla are doing. It's not a good sign when their last blog entry was in 2014. Compare these 2: - docs.webplatform.org/wiki/javascript/Array/every ("Portions of this content come from the Microsoft Developer Network") - developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/everyI know which one I prefer to read, and it's not just that one article, each one is pack with all the info you need, even browser compatibility, which is awesome when working with experimental APIs. Webplatform.org is good, and if the MDN didn't exist, I probably may have used it, but like you said earlier... "MDN FTW".
|
|
Former Member
inherit
guest@proboards.com
225992
0
Oct 31, 2024 18:32:16 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Dec 6, 2015 10:43:19 GMT -8
+2 for MDN
Far superior material than anything else on the web.
|
|
inherit
217348
0
Jul 27, 2022 7:26:44 GMT -8
Lynx
5,824
January 2015
msg
|
Post by Lynx on Dec 6, 2015 14:47:12 GMT -8
|
|