256 Kilobytes

Client-Side

Type All Category Client-SideDiscuss client-side web development, for example JavaScript. Tag All

Profile Photo - Some Guy

Re-enabling right click on sites that have it disabled?

Answers in Client-Side | By Some Guy

Published 1 month agoWed, 06 Feb 2019 13:44:08 -0800

Profile Photo - Some Guy

MoreI recently realized that there are certain websites that do not have the right click function ena
🗨
0
🐏
0
👁
43
Profile Photo - Some Guy

Finding the last updated date of a page with JS?

Answers in Client-Side | By Some Guy

Published 1 month agoWed, 06 Feb 2019 13:43:58 -0800

Profile Photo - Some Guy

MoreI have a basic programming question relating to web development. If it is possible, how do I use
🗨
0
🐏
0
👁
37
Profile Photo - Some Guy
Profile Photo - roxblade

Last Reply The getElementsByTagName cannot be used to select multiple tags. You need to run multiple queries for the tags separately. Alternatively, you can also... roxblade,

The getElementsByTagName...

Sat, 02 Feb 2019 06:55:28 -0800 1 month ago
🗨
1
🐏
0
👁
52
Profile Photo - Some Guy

What is the difference between Java and Javascript?

Answers in Client-Side | By Some Guy

Published 2 months agoSun, 13 Jan 2019 04:35:56 -0800

Profile Photo - roxblade

Last Reply Huge difference, really. Just because they both have Java in their name doesn't mean they belong to the same family or even class of programming. Java... roxblade,

Huge difference, really....

Fri, 01 Feb 2019 02:43:10 -0800 1 month ago
🗨
1
🐏
0
👁
52
Profile Photo - Some Guy

Why does document.getElementByClass() not work?

Answers in Client-Side | By Some Guy

Published 2 months agoThu, 17 Jan 2019 02:09:00 -0800

Profile Photo - August R. Garcia

Last Reply The function document.getElementByClass() does not exist. The correct function is document.getElementsByClassName(). Documentation: h... August R. Garcia,

The function documen...

Thu, 17 Jan 2019 02:10:59 -0800 2 months ago
🗨
1
🐏
0
👁
113
Profile Photo - Some Guy

[JavaScript] QuerySelector not working for multiple attributes?

Answers in Client-Side | By Some Guy

Published 2 months agoSun, 13 Jan 2019 04:36:26 -0800

Profile Photo - Some Guy

MoreSo I've been trying to code in JavaScript and I keep running into this weird error message:
🗨
0
🐏
0
👁
43
Profile Photo - Some Guy
Profile Photo - Some Guy

MoreI'm getting this error and I'm not sure how to get around it. "No access-control-a
🗨
0
🐏
0
👁
49
Profile Photo - Some Guy

[JavaScript] Why does this code not work correctly? Code: function multiply(a, b){ a * b }

Answers in Client-Side | By Some Guy

Published 2 months agoFri, 11 Jan 2019 23:40:27 -0800 | Last update 2 months agoFri, 11 Jan 2019 23:56:13 -0800

Profile Photo - August R. Garcia

Last Reply The function should state "return a * b;" instead of "a * b;" // Define the function function multiply(a, b){ return a * b;... August R. Garcia,

The function should state...

Fri, 11 Jan 2019 23:47:22 -0800 2 months ago
🗨
1
🐏
0
👁
398
Profile Photo - Some Guy

How do you convert a string to a CharArray in Java?

Answers in Client-Side | By Some Guy

Published 3 months agoSun, 16 Dec 2018 09:40:08 -0800

Profile Photo - Some Guy

I am currently learning JavaScript and h...

MoreI am currently learning JavaScript and had a question about strings and charArray. Is there a way
🗨
0
🐏
0
👁
57
Profile Photo - Some Guy

jquery is not defined error

Forum in Client-Side | By Some Guy

Published 3 months agoTue, 11 Dec 2018 01:37:07 -0800

Profile Photo - August R. Garcia

Last Reply Also, note that the dolalr sign in jQuery is short for "jQuery" and that these two lines of code are equivalent: $(document).ready(fun... August R. Garcia,

Also, note that the dolal...

Tue, 11 Dec 2018 02:26:18 -0800 3 months ago
🗨
2
🐏
0
👁
79
Profile Photo - Some Guy
Profile Photo - Hash Brown

Last Reply Super simple! In pure Javascript: <script type="text/javascript"> function theKeyPress(e){ var keynum; if(window.event) {... Hash Brown,

Super simple!

Tue, 04 Dec 2018 22:24:29 -0800 3 months ago
🗨
1
🐏
0
👁
47
Profile Photo - Some Guy

CKEditor replace by class

Answers in Client-Side | By Some Guy

Published 3 months agoSun, 02 Dec 2018 03:45:51 -0800

Profile Photo - August R. Garcia

Last Reply Yes, it can be done. Something along these lines works. Can remove the try/catch statement at your discretion. try { // Intialize CKEditor Ins... August R. Garcia,

Yes, it can be done. Some...

Mon, 03 Dec 2018 06:23:50 -0800 3 months ago
🗨
1
🐏
0
👁
58
Profile Photo - Some Guy

Is there a way to create a CSS color scale based on a div's value/innerHTML content (or vanilla JS)?

Answers in Client-Side | By Some Guy

Published 3 months agoSun, 02 Dec 2018 03:45:35 -0800 | Last update 3 months agoMon, 03 Dec 2018 05:28:28 -0800

Profile Photo - August R. Garcia

Last Reply Am fairly sure there is no built-in way to do this with pure CSS, but definitely doable with JS/jQuery. August R. Garcia,

Am fairly sure there is n...

Mon, 03 Dec 2018 06:15:47 -0800 3 months ago
🗨
1
🐏
0
👁
65
Profile Photo - Some Guy
Profile Photo - August R. Garcia

Last Reply Have seen a number of people recommend HTML Purifier:http://htmlpurifier.org/You might also look into PHP's strip_tags() function:http://php.net/... August R. Garcia,

Have seen a number of peo...

Sun, 02 Dec 2018 03:48:45 -0800 3 months ago
🗨
1
🐏
0
👁
50
Profile Photo - Some Guy

How to check "if classlist contains" using JavaScript

Answers in Client-Side | By Some Guy

Published 3 months agoSun, 02 Dec 2018 03:44:27 -0800

Profile Photo - August R. Garcia

Last Reply var c_menus = document.getElementsByClassName("c_menu");for (var iii = 0; iii < c_menu.length; ++iii) { c_menu[iii].addEventListe... August R. Garcia,

var c_menus = document.ge...

Sun, 02 Dec 2018 03:48:26 -0800 3 months ago
🗨
1
🐏
0
👁
61
Profile Photo - Some Guy

[CKEditor] Input validation?

Answers in Client-Side | By Some Guy

Published 3 months agoSun, 02 Dec 2018 03:44:17 -0800

Profile Photo - August R. Garcia

Last Reply Input validation through CKEditor is limited to the client-side, which means that the actual validation would occur on the server-side through PHP/Lar... August R. Garcia,

Input validation through...

Sun, 02 Dec 2018 03:48:16 -0800 3 months ago
🗨
1
🐏
0
👁
39
Profile Photo - Some Guy

[JavaScript] addEventListener to all in array?

Answers in Client-Side | By Some Guy

Published 3 months agoSun, 02 Dec 2018 03:43:56 -0800 | Last update 3 months agoSun, 02 Dec 2018 12:36:38 -0800

Profile Photo - August R. Garcia

Last Reply Use this instead of a static variable. for (iii = 0; iii < arr.length; ++iii) arr[iii].addEventListener("click", function(e) { this.... August R. Garcia,

Use this instead of...

Sun, 02 Dec 2018 03:47:55 -0800 3 months ago
🗨
1
🐏
0
👁
40
Profile Photo - Some Guy

How to round to two decimal places in Javascript?

Answers in Client-Side | By Some Guy

Published 3 months agoSun, 02 Dec 2018 03:43:06 -0800

Profile Photo - August R. Garcia

Last Reply The function that you're looking for is .toFixed(2):https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFix... August R. Garcia,

The function that you&#03...

Sun, 02 Dec 2018 03:47:05 -0800 3 months ago
🗨
1
🐏
0
👁
36
Profile Photo - Some Guy
Profile Photo - August R. Garcia

Last Reply Something like this should work:// Add a hidden input to store the IDsvar hidden_input = document.createElement("INPUT");hidden_input.setAtt... August R. Garcia,

Something like this shoul...

Sun, 02 Dec 2018 03:47:00 -0800 3 months ago
🗨
1
🐏
0
👁
39
Profile Photo - Some Guy

Harry Potter and the Goblet of Client-Side Input Validation

Forum in Client-Side | By Some Guy

Published 3 months agoSun, 02 Dec 2018 03:42:43 -0800 | Last update 3 months agoMon, 17 Dec 2018 00:54:58 -0800

Profile Photo - August R. Garcia

Last Reply Am working on this currently. General blog post. Includes misc. code snippets. Doing this currently to have an article to template from that actually... August R. Garcia,

Am working on this curren...

Sun, 02 Dec 2018 03:46:42 -0800 3 months ago
🗨
1
🐏
0
👁
42
Profile Photo - Some Guy
Profile Photo - August R. Garcia

Last Reply That error occurs because Chrome cannot focus hidden fields.Are you using a custom radio input setup that hides the actual radio button? August R. Garcia,

That error occurs because...

Sun, 02 Dec 2018 03:46:41 -0800 3 months ago
🗨
1
🐏
0
👁
55
Profile Photo - Some Guy
Profile Photo - August R. Garcia

Last Reply Something like this should work: <script> function create_thing(element) { // do something with an element passed to the function... August R. Garcia,

Something like this shoul...

Sun, 02 Dec 2018 03:46:03 -0800 3 months ago
🗨
1
🐏
0
👁
42
Profile Photo - Some Guy

JavaScript - How to hide a dialogue on click?

Answers in Client-Side | By Some Guy

Published 3 months agoSun, 02 Dec 2018 03:44:25 -0800 | Last update 3 months agoSun, 02 Dec 2018 13:02:25 -0800

Profile Photo - Some Guy

MoreI am referring specifically to the HTML5 <dialogue> tag.
🗨
0
🐏
0
👁
37
Profile Photo - Some Guy

Is it possible to inject jQuery into a web page via the developer console (inspect element)?

Answers in Client-Side | By Some Guy

Published 3 months agoSun, 02 Dec 2018 03:43:18 -0800 | Last update 2 months agoMon, 31 Dec 2018 00:59:21 -0800

Profile Photo - Some Guy

Like, into the Google Chrome inspect ele...

MoreLike, into the Google Chrome inspect element console. If I want to run jQuery to scrape another w
🗨
0
🐏
0
👁
46
Profile Photo - Some Guy
Profile Photo - Some Guy

MoreCKEditor uses Magic to replace <textarea> elements with a bunch of Magic (iframes, etc), wh
🗨
0
🐏
0
👁
38
Profile Photo - Some Guy

"Thanks for Inventing JavaScript" meme - Are these bugs or features?

Forum in Client-Side | By Some Guy

Published 3 months agoSun, 02 Dec 2018 03:42:52 -0800 | Last update 3 months agoMon, 17 Dec 2018 00:54:39 -0800

Profile Photo - Some Guy

What's the deal with this meme? Why...

MoreWhat's the deal with this meme? Why exactly do these lines of JS code evaluate to what is sho
🗨
0
🐏
0
👁
38
Profile Photo - Some Guy

[JavaScript] Can JS check if keydown/keyup is a comma, but not the less than symbol ( < )?

Answers in Client-Side | By Some Guy

Published 3 months agoSun, 02 Dec 2018 03:42:50 -0800 | Last update 3 months agoMon, 03 Dec 2018 06:48:22 -0800

Profile Photo - Some Guy

MoreThe comma and the "less than" symbol are both on the same key. I'd like to have a J
🗨
0
🐏
0
👁
43