Questions tagged [javascript]

JavaScript (not to be confused with Java) is a high-level, dynamic, multi-paradigm, weakly-typed language used for both client-side and server-side scripting. Use this tag for questions regarding common implementations of ECMAScript, JavaScript, JScript, etc. JS does not typically refer to its ECMA-cousin, ActionScript.

Filter by
Sorted by
Tagged with
1
vote
1answer
323 views

linux script as a service within PHP & JS

Is it possible to create a web application/service in PHP in which the backbone of the application/service is really a linux script and PHP is just relaying the data from the script? The linux script ...
3
votes
1answer
554 views

Resource to start with JavaScript quickly? [closed]

Previously, I wanted to learn Python quickly: https://softwareengineering.stackexchange.com/questions/49755/resource-to-start-with-python-quickly and I was quite successful (enough to write a ...
9
votes
6answers
6k views

Code review guidelines for CSS, JS and HTML

I have been asked to create guidelines for review CSS, JS and HTML. I know there are coding guidelines for JS but I don't know any about HTML and CSS. To review JS I will certainly follow those ...
1
vote
2answers
147 views

Cross-library and cross-programming-environment support

Often people talk about cross-platform compatibility, but is it possible to write such "universal code" that would work both in browser, in desktop, on opengl, on webgl, and on html5 canvas-object? I'...
2
votes
1answer
254 views

Wondering if my computer books from 2002/2003 are still useful? [closed]

I found two books in my basement today and it was about Javascript and PHP/MySQL. Are they still useful? I hope it's still useful, since I don't want to buy a new one... 1.JavaScript - Comprehensive, ...
8
votes
3answers
2k views

Using CSS classes as decorators - a good pattern?

I've been building a web-app with a fairly complex GUI - many small elements alongside eachother and within other elements that need various behaviours (dragging, clicking, but context-sensitive). My ...
3
votes
2answers
601 views

Strategy for designing a plugin API

I am working on an application for which a rich plugin API is crucial. What is the best process for creating an API that is intuitive and easy to learn?
5
votes
2answers
2k views

Javascript, functional programming and parallel processing

When I use jquery library I notice that the code will continue execution regardless the previous line complete the execution. More precisely while using jquery ajax, it will continue execution without ...
4
votes
2answers
378 views

Indenting/breaking jquery chains for readability

I'm curious as to how other people indent/break long jQuery chains, as I can never decide what is more readable (particularly when using .end() to "close" a block of methods e.g. $(this).not(":has(....
3
votes
1answer
4k views

How to generate nonce for Ajax web requests

As many of you know WordPress uses "secret key" like thing for every AJAX request. Making each request unique and also 'somewhat' secure (just a step ahead than nothing). How would I implement the ...
1
vote
1answer
620 views

How to submit a bug/fix for jquery unobtrusive validation?

I found a small bug in the microsoft mvc3 remote validation, concerning the clientside javascript implemented in jquerys unobtrusive javascript. The problem/bug can be fixed by adding a few lines to ...
2
votes
1answer
614 views

How do you name “javascript:” prefix in inline event handlers?

In the following code: <a onclick="javascript:alert()"> how do you name the javascript: part? Protocol, pseudo-protocol, scheme, label, prefix? I am only trying to figure out a common name ...
11
votes
2answers
1k views

How can I use my coding skills for good?

By this autumn my two small websites should be generating around a total of $1200 a month with minimal/zero input which is enough to for me to live on comfortably enough. Rather than embark on ...
1
vote
8answers
12k views

Is it better to learn html, javascript, php, then mysql if you want to start your own site? [closed]

Is it better to learn html, javascript, php, then mysql if you want to start your site? Is it better to learn it in that order or not?
2
votes
2answers
1k views

Using JSTestdriver to test UI/DOM?

Can JSTestDriver be used to test DOM behaviors and interactions? I see I can write tests to exercise pure JS but how do I go about testing against HTML or DOM? Can I deliver with each test HTML for ...
2
votes
2answers
375 views

Javascript business model

Does anyone know anything about slidedeck's business model (see link below)? These guys are a javascript component that they sell online. As the tech savvy know - It's very difficult to sell ...
4
votes
5answers
294 views

Is it possible for a technically open source application (specifically javascript) to be released under a proprietary license?

A javascript application release won't technically be closed source - at best it can be obfuscated. Given that, my question has two parts: Is it at all possible to release a technically open ...
2
votes
3answers
311 views

Recomendations for Front-End to Programming Transition

I am a front-end developer seeking to add programming to my skillset. As with all things, I'm sure that practice and practical application will aid me most, but I am currently having trouble wrapping ...
9
votes
2answers
1k views

Moving all UI logic to Client Side?

Our team originally consisted of mostly server side developers with minimum expertise in Javascript. In ASP.NET we used to write a lot of UI logic in code-behind or more recently through controllers ...
4
votes
9answers
619 views

One good reason for a rewrite

I have a personal web project I cut my teeth on learning how to program. I wrote it in PHP and learned as I went. I eventually I re-factored it to use MVC and removed all mixing of php/html. Right ...
5
votes
3answers
2k views

Why make JavaScript class based?

JavaScript is a prototype language. To turn it into a class based language adds little value? I am not talking about best-practice here. I remember reading an article from way back, which claimed that ...
5
votes
1answer
772 views

Why are Javascript for/in loops so verbose?

I'm trying to understand the reasoning behind why the language designers would make the for (.. in ..) loops so verbose. For example: for (var x in Drupal.settings.module.stuff) { alert("Index: " ...
5
votes
3answers
879 views

Weighing pros and cons for using jQuery for just one widget

I have been using html select boxes or textboxes for date input. On submit, the date is validated and if invalid an error is returned. I have avoided javascript calendars thus far, but jQuery ...
5
votes
6answers
361 views

Does my JavaScript look big in this?

As programmers, you have certain curtains to hide behind with your code. With PHP all of your code is server side preprocessed, so this never see's the light of day as far as the user is concerned. If ...
9
votes
2answers
742 views

Do I need to paste open source license information at the top of my webpage?

I'm developing a JavaScript application that uses several open source JavaScript projects. All their licenses have a phrase like "You must give any other recipients of the Work or Derivative Works a ...
2
votes
3answers
657 views

Starting my first RoR project, what JS library is good to go with it?

I'm starting my first Ruby on Rails project as I've been excited about the language for quite a while now and I'm sick of writing PHP. I've gathered that rails is pretty much an automation framework ...
11
votes
14answers
1k views

Should I worry about 'Javascript piracy'?

If I write a client-side Javascript app (with a little bit of server interaction), how can I prevent people from copying the Javascript files to their own site? Should I, at all?
3
votes
2answers
468 views

What is “Simplified JavaScript”?

Douglas Crockford makes reference to Simplified JavaScript in this article about Top Down Operator Precedence. Unfortunately he only makes references to it in this article. The best explanation I ...
-1
votes
2answers
176 views

Why don't browsers have the ability to differentiate between events triggered via input devices and scripts ex: element.onEvent()?

Why don't browsers have the ability to differentiate between events triggered via input devices and scripts ex: element.onEvent()? Wouldn't this be a very simple way counter attack web spam bots? Or ...
3
votes
1answer
181 views

Alternative methods for maintaining JavaScript source

I'm looking for other options for maintaining my personal JavaScript namespace. The problem I'm having boils down code Organization Vs. Performance. I would simply LOVE to be able to separate major ...
5
votes
2answers
7k views

Common mistakes with javascript arithmetic [closed]

I've ran into several oddities using javascripts floating point arithmetic, but I can never recall them off the top of my head! What are some common mistakes when using JavaScript to do math?
6
votes
7answers
613 views

Long Keywords like `function` and `namespace`

In many English-based programming languages like C++ and JavaScript, there exist long keywords like function, namespace, exception (in OCaml languages) and such. Do you think shorter keywords like ...
7
votes
3answers
1k views

JavaScript for a non-programmer [closed]

2 years ago I starded learning AS3 in order to get hired at a web design company. A few months later, I ditched it, because I discovered that I'm better at design; so now I'm a web designer. Recently,...