Java , c++ or anything else ?

JerseyFoo

1/g = g-1
Reaction score
40
Hooray for making things more complicated then needed?

Just save as blah.js and have this as code:
If that actually works in any browser, it's just the browser being nice.

Easiest way is to serve the javascript within the HTML as said. JavaScript is not meant to be standalone.

Hooray for not knowing what your talking about...

JavaScript was originally called Mocha ( best name imo ), then LiveScript, then JavaScript, and microsoft released 'JScript'. When you add XML support, it's called E4X, but JavaScript along with ActionScript and all related languages are officially 'ECMAScript'.
 

duyen

New Member
Reaction score
214
If that actually works in any browser, it's just the browser being nice.

Easiest way is to serve the javascript within the HTML as said. JavaScript is not meant to be standalone.

Hooray for not knowing what your talking about...

JavaScript was originally called Mocha ( best name imo ), then LiveScript, then JavaScript, and microsoft released 'JScript'. When you add XML support, it's called E4X, but JavaScript along with ActionScript and all related languages are officially 'ECMAScript'.

Hooray for browsers that support .js
 

SFilip

Gone but not forgotten
Reaction score
634
> browsers that support .js
The correct way to "support" .js files is to show them as text - browsers that don't probably aren't into the whole standards concept. :rolleyes:
The browser can't know how a .js file should be interpreted. In fact, it can't even know that a .js actually contains JavaScript code as extensions only really matter to humans. If it is JS, it could be the javascript used in webpages, but there are a bunch of other things it can be - browsers aren't the only thing that uses javascript. Most notably, it can be used by the Windows Script Host in which case it would have more or less the same syntax, but should be interpreted differently.
When part of a HTML file, the browser knows exactly how to interpret the JavaScript code and allow it to access the DOM objects for instance.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top