Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to Software Development on Codidact!

Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.

Posts tagged javascript

8 child tags

Use for questions regarding programming in ECMAScript (JavaScript/JS) and its various implementations. This should be accompanied by the specific framework / dialect used (e.g. jquery, node.js, typescript).

This tag doesn't have a detailed wiki yet.

71%
+3 −0
Q&A How to make the text box such that its placeholder goes up and arranges itself in the centre of the border upon clicking?

How to make the placeholder so that it goes to the top of the border line on click? For example, when you go to Gmail and click on the input field, the placeholder text goes up and arranges itself...

1 answer  ·  posted 2y ago by nobodyImportant‭  ·  edited 2y ago by hkotsubo‭

Question javascript html css
60%
+1 −0
Q&A Using http.get to get page from frontend

It's possible to use Angular 8 http.get to get a page from the frontend itself ? My local frontend url: https://192.168.0.177:4200/ I tried in a service: test(): Observable<string> { ret...

1 answer  ·  posted 2y ago by nelson777‭  ·  last activity 2y ago by Derek Elkins‭

71%
+3 −0
Q&A setting of translateX for carousel image slider

I made carousel image slider by following tutorials. To slide images , I made the below function. const moveToSlide = (track, currentSlide, targetSlide) => { track.style.transform = 'translat...

0 answers  ·  posted 2y ago by aya2222‭  ·  edited 2y ago by aya2222‭

42%
+1 −2
Q&A How do I filter an array in C?

No, I'm not trying to get the full program written completely in C by you guys. I only need some way to implement the functionalities of each function I found confusing. In this challenge in Code ...

2 answers  ·  posted 2y ago by General Sebast1an‭  ·  last activity 2y ago by Derek Elkins‭

Question c javascript array
57%
+2 −1
Q&A Function.prototype.call()

I wanted to print to browser console the number of li list items of a given ul list. This didn't work (console output was undefined): console.log(document.querySelectorAll(".example").length); ...

1 answer  ·  posted 2y ago by deleted user  ·  edited 2y ago by Alexei‭

57%
+2 −1
Q&A How to include HTML files in another HTML file with vanilla Javascript?

I develop an HTML-CSS-JavaScript-PHP contact form and I have a large HTML file which is very long and very wide (lots of horizontal scrolling due to nesting) and it's hard for me personally to work...

0 answers  ·  posted 2y ago by deleted user  ·  edited 2y ago by Alexei‭

60%
+1 −0
Q&A Uncaught ReferenceError: variable is not defined

I have a variable defined using const keyword. function Text() { const variable = "Hello!"; } console.log(variable); When I try to access this variable, I get: Uncaught ReferenceError...

1 answer  ·  posted 2y ago by Kevin M. Mansour‭  ·  edited 2y ago by Alexei‭

37%
+1 −3
Q&A theme always not changing [closed]

const body = document.body; const light = evt => { body.setAttribute('data-theme', 'light'); localStorage.setItem("theme", "light"); console.log("light"); } const dark = ...

0 answers  ·  posted 2y ago by Anonymous‭  ·  closed 2y ago by Alexei‭

Question javascript html theme
77%
+5 −0
Q&A What's the difference between =, == and === operators in JavaScript?

While learning JavaScript, I started to see =, == and === operators. What's the difference between them?

3 answers  ·  posted 2y ago by Kevin M. Mansour‭  ·  last activity 2y ago by hkotsubo‭

81%
+7 −0
Q&A What's the difference between placing <script> in the <head> and placing in the <body>?

While learning JavaScript, I started to see sometimes the <script> is placed in the <head> and sometimes it is placed in the <body>, What's difference between placing the <scri...

1 answer  ·  posted 2y ago by Kevin M. Mansour‭  ·  last activity 2y ago by Kevin M. Mansour‭

83%
+8 −0
Q&A Path separator for Atom / JavaScript on Windows

I have developed an Atom package which calls SyncTeX (a utility for reverse lookup for LaTeX), and then opens in Atom the file specified in the SyncTeX response. I'm developing on Linux, but now a ...

0 answers  ·  posted 3y ago by A. Donda‭  ·  last activity 2y ago by Kevin M. Mansour‭

33%
+1 −4
Q&A How to call a function from ruby-on-rails (HTML)?

Let I have a button <button type="button" onclick = "myfunction()" class="collapsible">Expand content</button> And, I have a JS function. function collapse() { var coll = docu...

1 answer  ·  posted 2y ago by deleted user  ·  last activity 2y ago by Kevin M. Mansour‭

28%
+0 −3
Q&A Storing input from different frontend webpages of a multi page contact form

I consider to create a multi page contact form in which there is one backend page but about 5 front-end pages (stage 1-5). Pages 1-4 are input pages and page 5 is for a submit button and a success ...

1 answer  ·  posted 2y ago by deleted user  ·  last activity 2y ago by elgonzo‭

81%
+7 −0
Code Reviews Is this HTML sanitizer safe?

I wrote this HTML sanitizer for use in web scraping. The idea is to safely copy content from a site but apply my own style-sheet and remove any unsafe elements. This whitelist approach seems very d...

1 answer  ·  posted 3y ago by mousetail‭  ·  edited 2y ago by Peter Taylor‭

71%
+3 −0
Q&A How to retain a service's data between components in Angular 8 ?

I would like to maintain a log that is available to several modules in my Angular 8 system. So I created the following service: @Injectable({ providedIn: 'root' }) export class LogService { ...

1 answer  ·  posted 3y ago by nelson777‭  ·  last activity 3y ago by nelson777‭

81%
+7 −0
Q&A Why is this client code getting the wrong date for a few hours a day?

Our web site has a widget that displays some date-based information that we retrieve from some JSON-formatted data (one object per date). We get the current date from the environment, possibly adj...

2 answers  ·  posted 3y ago by Monica Cellio‭  ·  last activity 3y ago by hkotsubo‭

Question javascript datetime
57%
+2 −1
Q&A Not obligating http:// or https:// in a url field of a contact form

I have a simple HTML-PHP-CSS contact form (no JavaScript) with an input type="url" field. Currently in 30/03/2021, the default behavior of input type="url" (by W3C design I guess) is to obligate t...

1 answer  ·  posted 3y ago by deleted user  ·  last activity 3y ago by Alexei‭

Question php javascript html
57%
+2 −1
Q&A Are JavaScriptless forms accessible?

I consider to make my website's contact form totally javascriptless (only HTML-PHP-CSS --- no JavaScript at all). No modals or alerts No prevent default No AJAX/AJAX/XHR/JHR No form disappear...

1 answer  ·  posted 3y ago by deleted user  ·  last activity 3y ago by Alexei‭

75%
+4 −0
Q&A Resize HTML canvas with respect to inner content

I am currently making an esoteric language which requires a theoretically infinite canvas. Basically, it should be able to resize and fit the contents of the drawing in and outside it's existing bo...

0 answers  ·  posted 3y ago by Razetime‭

66%
+2 −0
Q&A Tampermonkey userscript prevents pages from loading

I am currently making a userscript to interpret the APL programming language in a Stackexchange chat window. This is the code I have come up with: // ==UserScript== // @name APL chat // @ver...

1 answer  ·  posted 3y ago by Razetime‭  ·  last activity 3y ago by Razetime‭

81%
+7 −0
Q&A Function call; `this` gets bound to unexpected value

I recently encountered a strange situation in javascript; if I have: let obj = { a: function() { return (this === obj) ? this.b : 'bye'; }, b: 'hello' }; I can call obj.a with this bound...

2 answers  ·  posted 3y ago by Gershy‭  ·  last activity 3y ago by Alexei‭

86%
+11 −0
Q&A Can regex be used to check if input conforms to a very strict subset of HTML?

Tldr; I don't need to parse HTML, but I need to check if user submitted input conforms to a very strict subset of HTML. Can regex be a suitable tool for this? Details I have a frontend sanitiser th...

4 answers  ·  posted 3y ago by jla‭  ·  last activity 3y ago by Stephen C‭

Question javascript regex html
66%
+2 −0
Q&A Nodejs wrap async function in synchronous function

I am writing a spoof of the fs module; the actual storage mechanism is not the the filesystem but rather a database. Overall, however, the api will function exactly like fs. So far my code is compa...

1 answer  ·  posted 3y ago by Gershy‭  ·  last activity 3y ago by Moshi‭

60%
+1 −0
Q&A Access TypeScript class outside bundled code

I'm developing the design framework for a certain Q&A site. We are currently using an external dependency for the tag selector on the post editor, but it has some disadvantages (not fitting int...

1 answer  ·  posted 3y ago by luap42‭  ·  last activity 3y ago by ArtOfCode‭