256 Kilobytes

Client-Side

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

Profile Photo - Some Guy

What is the difference between Java and Javascript?

Answers in Client-Side | By Some Guy

Published 1 year agoSun, 13 Jan 2019 04:35:56 -0800

Profile Photo - August R. Garcia

Last Reply See also: https://www.256kilobytes.com/content/show/1916/javascript-vs-ecmascript-vs-typescript-vs-coffeescript-differences-what-to-use-and-when... August R. Garcia,

See also:

Tue, 31 Dec 2019 22:42:18 -0800 3 weeks ago
🗨
4
🐏
0
👁
530
Profile Photo - August R. Garcia

[Solved] Implementing an "Estimated Time to Crack" Notification for Registration Forms

Answers in Client-Side | By August R. Garcia

Published 1 month agoFri, 06 Dec 2019 15:14:05 -0800 | Last update 1 month agoFri, 06 Dec 2019 15:15:37 -0800

Profile Photo - August R. Garcia

Probably edit slightly for a cleaner UI<...

MoreProbably edit slightly for a cleaner UI Code and demo: Message Here  <form> <input id="test" type="text" /> <span i...
🗨
0
🐏
0
👁
60
Profile Photo - Some Guy
Profile Photo - August R. Garcia

Last Reply To make CKEditor required on the client side, adding a "required" attribute to the initial textarea will not work. Instead, some JavaScript is require... August R. Garcia,

To make CKEditor required...

Tue, 03 Dec 2019 13:08:46 -0800 1 month ago
🗨
1
🐏
0
👁
233
Profile Photo - Default

A family Journey is full of fun and cheer in Nepal

Forum in Client-Side | By tourpackage01

Published 1 month agoMon, 02 Dec 2019 02:00:51 -0800 | Last update 1 month agoMon, 02 Dec 2019 02:34:38 -0800

Profile Photo - Hash Brown

Last Reply I went on this tour and got raped Hash Brown,

I went on this tour and g...

Mon, 02 Dec 2019 02:35:03 -0800 1 month ago
🗨
2
🐏
0
👁
75
Profile Photo - August R. Garcia

[Solved] Enabling Shades/Tints of All Colors in CKEditor

Answers in Client-Side | By August R. Garcia

Published 1 month agoMon, 02 Dec 2019 01:27:11 -0800 | Last update 1 month agoTue, 03 Dec 2019 12:53:14 -0800

Profile Photo - August R. Garcia

There is a CKEditor plugin called Color...

MoreThere is a CKEditor plugin called Color Button that can be used to add buttons to CKEditor instances to change font colors and background colors....
🗨
0
🐏
0
👁
56
Profile Photo - August R. Garcia
Profile Photo - August R. Garcia

Code:

MoreCode: <form> <button class="btn" onclick="doubleclick_confirm_submit(event, this);" type="button">Ban/Unban</button> <...
🗨
0
🐏
1
👁
61
Profile Photo - August R. Garcia

[Solved] CSS Effect for Custom File Input on Dragover/DragEnter

Answers in Client-Side | By August R. Garcia

Published 1 month agoTue, 26 Nov 2019 11:27:39 -0800

Profile Photo - August R. Garcia

Easiest solution I found was to add a cu...

MoreEasiest solution I found was to add a custom attribute based on ondrag[something] events and to then use a CSS attribute selector: <script>...
🗨
0
🐏
1
👁
55
Profile Photo - August R. Garcia

[Solved] CKEditor Autosave Draft Functionality - 1.4KB, No Plugin

Articles in Client-Side | By August R. Garcia

Published 2 months agoSat, 23 Nov 2019 10:25:57 -0800 | Last update 2 months agoSat, 23 Nov 2019 10:32:16 -0800

Profile Photo - August R. Garcia

Last Reply PS: If you're wondering, this code is not yet live on 256 Kilobytes; will be in the next patch. August R. Garcia,

PS: If you're wondering,...

Sat, 23 Nov 2019 10:27:41 -0800 2 months ago
🗨
1
🐏
1
👁
142
Profile Photo - August R. Garcia

[Solved] Automatically apply color scale to HTML table with JavaScript

Answers in Client-Side | By August R. Garcia

Published 3 months agoTue, 08 Oct 2019 18:56:14 -0700 | Last update 3 months agoTue, 08 Oct 2019 19:08:22 -0700

Profile Photo - August R. Garcia

*Basically solved

MoreHere's some code. However, this code is fairly slow on large tables (adds roughly 50-150 milliseconds for 190 rows of four columns). Probably usu...
🗨
0
🐏
0
👁
110
Profile Photo - August R. Garcia

[Solved] Adding an "active" class to <nav>/navigation menus in Laravel

Answers in Client-Side | By August R. Garcia

Published 5 months agoTue, 20 Aug 2019 16:25:41 -0700 | Last update 5 months agoTue, 20 Aug 2019 16:26:29 -0700

Profile Photo - August R. Garcia

Basically the same with PHP in general;...

MoreBasically the same with PHP in general; only real difference is the use of Route::currentRouteName(). Code: <nav> <?php $...
🗨
0
🐏
0
👁
122
Profile Photo - August R. Garcia

[Solved] How to automatically replace newlines with commas when data is pasted into an HTML <input>

Answers in Client-Side | By August R. Garcia

Published 5 months agoFri, 09 Aug 2019 19:14:14 -0700 | Last update 5 months agoFri, 09 Aug 2019 19:18:12 -0700

Profile Photo - August R. Garcia

Last Reply Can add a few more regex lines to trim empty commas: el.value = el.value.replace(/\n/g, ', '); el.value = el.value.replace(/\t/g, '... August R. Garcia,

Can add a few more regex...

Fri, 09 Aug 2019 19:44:27 -0700 5 months ago
🗨
1
🐏
0
👁
193
Profile Photo - August R. Garcia

[Solved] Downloading arbitrary tables as TSV using JavaScript

Answers in Client-Side | By August R. Garcia

Published 5 months agoSun, 04 Aug 2019 05:42:57 -0700

Profile Photo - August R. Garcia

Title.

MoreTitle. <!DOCTYPE html> <html> <head> <title>Test Table Download</title> </head> <body> <h1&g...
🗨
0
🐏
0
👁
174
Profile Photo - August R. Garcia

[Solved] Uncaught TypeError: $(...).autocomplete is not a function

Answers in Client-Side | By August R. Garcia

Published 7 months agoFri, 21 Jun 2019 13:23:54 -0700

Profile Photo - August R. Garcia

Include the jQuery UI library in additio...

MoreUse this: <!DOCTYPE html> <html> <head> <link href="http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css" r...
🗨
0
🐏
0
👁
358
Profile Photo - Some Guy

[JavaScript] QuerySelector not working for multiple attributes?

Answers in Client-Side | By Some Guy

Published 1 year agoSun, 13 Jan 2019 04:36:26 -0800

Profile Photo - Default

Last Reply You should show some code. But this error generally is thrown when you use space between attributes. document.querySelector("[data-id='1'] [data-... Ali,

You should show some code...

Wed, 29 May 2019 05:23:00 -0700 7 months ago
🗨
1
🐏
0
👁
312
Profile Photo - Some Guy
Profile Photo - Default

Last Reply Another approach is a prototype based solution. Node.prototype.getElementsByTagNames = function (tags) { var elements = []; for (... Ali,

Another approach is a pro...

Wed, 29 May 2019 05:05:53 -0700 7 months ago
🗨
2
🐏
0
👁
286
Profile Photo - Some Guy

JavaScript - How to hide a dialogue on click?

Answers in Client-Side | By Some Guy

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

Profile Photo - Default

Last Reply Did you mean "<dialog>" tag? If so, you can use JS API like that; HTML5 Content <dialog open> <p>Greetings, one and al... Ali,

Did you mean "<dialog&...

Tue, 28 May 2019 23:24:45 -0700 7 months ago
🗨
2
🐏
0
👁
315
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 1 year agoSun, 02 Dec 2018 03:42:50 -0800 | Last update 1 year agoMon, 03 Dec 2018 06:48:22 -0800

Profile Photo - Univa

Last Reply Here's a simple solution that will catch all characters, backspace, and delete.  $("input").keydown(function(event) {     var isW... Univa,

Here's a simple solution...

Sun, 05 May 2019 03:01:05 -0700 8 months ago
🗨
1
🐏
0
👁
282
Profile Photo - Some Guy

Finding the last updated date of a page with JS?

Answers in Client-Side | By Some Guy

Published 11 months agoWed, 06 Feb 2019 13:43:58 -0800

Profile Photo - WTCMolybdenam4753

Last Reply There is a simple solution to finding the last update of a page in JS! Simply enter "javascript:alert(document.lastModified)" -without the quotes, int... WTCMolybdenam4753,

There is a simple solutio...

Sat, 30 Mar 2019 14:45:42 -0700 9 months ago
🗨
1
🐏
0
👁
283
Profile Photo - Some Guy

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

Answers in Client-Side | By Some Guy

Published 11 months agoWed, 06 Feb 2019 13:44:08 -0800

Profile Photo - Graln_of_Truth

Last Reply You can try disabling Javacript and then reloading the page; this seems to be the most common issue however there are several other things you can try... Graln_of_Truth,

You can try disabling Jav...

Sat, 30 Mar 2019 13:56:19 -0700 9 months ago
🗨
1
🐏
0
👁
246
Profile Photo - Some Guy

Why does document.getElementByClass() not work?

Answers in Client-Side | By Some Guy

Published 1 year 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 1 year ago
🗨
1
🐏
0
👁
476
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-allow-origin header is present on the requested resour...
🗨
0
🐏
0
👁
215
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 1 year agoFri, 11 Jan 2019 23:40:27 -0800 | Last update 1 month agoSun, 01 Dec 2019 18:06:03 -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 1 year ago
🗨
1
🐏
0
👁
2,209
Profile Photo - Some Guy

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

Answers in Client-Side | By Some Guy

Published 1 year 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 to convert a string inti a charArray?
🗨
0
🐏
0
👁
250
Profile Photo - Some Guy

jquery is not defined error

Forum in Client-Side | By Some Guy

Published 1 year 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 1 year ago
🗨
2
🐏
0
👁
268
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 1 year ago
🗨
1
🐏
0
👁
242
Profile Photo - Some Guy

CKEditor replace by class

Answers in Client-Side | By Some Guy

Published 1 year 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 1 year ago
🗨
1
🐏
0
👁
276
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 1 year agoSun, 02 Dec 2018 03:45:35 -0800 | Last update 1 year 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 1 year ago
🗨
1
🐏
0
👁
259
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 1 year ago
🗨
1
🐏
0
👁
260
Profile Photo - Some Guy

How to check "if classlist contains" using JavaScript

Answers in Client-Side | By Some Guy

Published 1 year 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 1 year ago
🗨
1
🐏
0
👁
274
Profile Photo - Some Guy

[CKEditor] Input validation?

Answers in Client-Side | By Some Guy

Published 1 year 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 1 year ago
🗨
1
🐏
0
👁
253