Skip to end of metadata
Go to start of metadata

JavaScript (JS) is a lightweight, interpreted, or just-in-time compiled programming language with first-class functions. While it is most well-known as the scripting language for Web pages, many non-browser environments also use it, such as Node.js, Apache CouchDB and Adobe Acrobat.

Javascript is usually combined with HTML5 to implement rich UI. Below is useful information:

  • Page:
    Check whether a checkbox is checked in Javascript (Knowledge Base) Checkbox object in HTML has a property checked as boolean - it has true or false, so javascript can check its status easily.
  • Page:
    Input Text readOnly Property in Javascript (Knowledge Base) —  Set a text field to read-only in javascript
  • Page:
    Draggable DIV tag combined with Javascript (Knowledge Base) — For draggable DIV tag, what you need to keep in mind is "position: absolute" in style sheet.
  • Page:
    Drag and drop image in div tag in Javascript/HTML5 (Knowledge Base) — Drag and drop is a very common feature. It is when you "grab" an object and drag it to a different location. In HTML5, drag and drop is part of the standard: Any element can be draggable. The element you should keep in mind is draggable="true" ondragstart="func(event)" for starting drag, and ondrop="drop(event)" ondragover="allowDrop(event)" for accepting dragging.
  • Page:
    HTML / HTML5 (Knowledge Base) HTML5 is a software solution stack that defines the properties and behaviors of web page content by implementing a markup based pattern to it. HTML5 is the fifth and current major version of HTML, and subsumes XHTML.
  • Page:
    Upload multi selected files with single array variable in PHP (Knowledge Base) — Array in HTML5 is useful when upload files with multi selection on file management dialog. Note that you should add tag (multiple="multiple") to the "file" type element. In the PHP, you will be able to manage uploaded files easily by index.
  • Page:
  • Page:
    Combo box (drop-down list) in HTML (Knowledge Base) — To implement Combo box also known as drop-down list, you should use <select> tag
  • Page:
    Array Length in JavaScript (Knowledge Base) — In JavaScript, <array>.length returns the total number of item.
  • Page:
    Upload multiple files serially and show its progress in real-time with XMLHttpRequest and PHP (Knowledge Base) — Uploading files serially is strongly needed when uploading large files to the server, because it helps user to ensure the uploaded file is correctly delivered or not, so they can do the necessary things easily.
  • Page:
    HTML5 Canvas (Knowledge Base) — The HTML5 <canvas> tag is used to draw graphics, on the fly, via scripting (usually JavaScript). However, the <canvas> element has no drawing abilities of its own (it is only a container for graphics) - you must use a script to actually draw the graphics. The getContext() method returns an object that provides methods and properties for drawing on the canvas.
  • Page:
    Adding HTML content dynamically by innerHTML (Knowledge Base) — When you assign ID for HTML entity for <p> tag or <div> tag, we can dynamically update its content. You can find the object by getElementById(), and do the necessary actions into innerHTML. For instance, you can do it like document.getElementById( "element_id").innerHTML = "hello, world!";
  • Page:
    Playback Video in HTML5 (Knowledge Base) — In HTML5, playback video is super easy by <video width="...." height="...." autoplay> tag. You can also set its source by <source src="movie.mp4" type="video/mp4"> tag.
  • Page:
    react.js (Knowledge Base) React is a JavaScript library for building user interfaces. It is maintained by Facebook and a community of individual developers and companies. React can be used as a base in the development of single-page or mobile applications.
  • Page:
    node.js (Knowledge Base) — Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine.