Go Back   All Net Tools - Forum > Main > Programming
Register FAQ Members List Social Groups Calendar Search Today's Posts Mark Forums Read

Closed Thread
 
Thread Tools Display Modes
  #1  
Old 08-06-2009, 03:42 AM
gilbertsavier gilbertsavier is offline
Registered User
 
Join Date: Jun 2009
Posts: 10
What is JavaScript?

Hello,
JavaScript is a compact, object-based scripting language for Web pages. JavaScript code embedded into your HTML pages can enhance them with many interesting elements, from swapping images when you move a cursor over them, to multi-level drop-down menus.

You can create really sophisticated and almost application-like pages with the help of JavaScript. You don't need any special software other than a text editor and a Web browser, and you don't need access to a Web server. You can create and test all your JavaScript code right on your own computer.

JavaScript and Java
Although the names are almost the same, JavaScript isn't the same as Java. These are two different techniques for Internet programming. Java is a real programming language, and you can create real programs with it.

JavaScript is a scripting language. You could even say that JavaScript is rather an extension to HTML than a separate computer language. It's so tightly integrated with HTML that you could call it "JavaScript markup language." JavaScript coders don't care too much about real programming, they just make different nice effects by inserting small JavaScript code fragments into their Web pages.

The drawbacks of JavaScript
Right now the biggest problem is the imperfect JavaScript implementations that today's browsers offer. Although all major browsers that are version 3.0 or higher include JavaScript support, they deal with JavaScript differently.

In fact, different versions of the same browser handle JavaScript differently. This makes it difficult to create a complicated JavaScript code that work across all browsers. So always check your pages on as many different browsers (and even platforms) as possible.

What do JavaScript code look like?
Like HTML, JavaScript is just text that can be typed into a text editor. Its code is embedded in HTML within a <SCRIPT> tag. Some old browsers don't understand this tag. To prevent them from treating your JavaScript as HTML, always use this trick involving HTML comments...

Code:
<script type="text/javascript">
<!-- hide JavaScript code from old browsers
YOUR SCRIPT HERE
// end the hiding comment -->
</script>


Here's an example of JavaScript code that prints current date in the top right corner of your Web page...
Code:
<html>
<head>
<script type="text/javascript">
<!--
function PrintDate() {
today = new Date();
document.write('Date: ', today.getMonth()+1, '/', today.getDate(), '/', today.getYear());
}
//-->
</script>
</head>

<body>
<p align="right">
<script type="text/javascript">
<!--
PrintDate();
//-->
</script>
</p>
THE REST OF YOUR PAGE.
</body>
</html>
__________________
Thanks & regards
Lokananth
Live Chat Software By miOOt
  #2  
Old 09-04-2009, 05:29 AM
fayas222 fayas222 is offline
Registered User
 
Join Date: Sep 2009
Posts: 1
Netscape originally invented a simple scripting language called LiveScript, which was to be a proprietary add-on to HTML. When Sun's new language Java became unexpectedly popular, Netscape was quick to jump on the Java bandwagon, and re-christened their scripting language JavaScript. Outside of the first four letters, there are almost no other similarities between the two.

Microsoft then added their own version of JavaScript to Internet Explorer, which they named JScript. Unfortunately, the two were not identical, so Netscape then attempted to straighten matters out by turning JavaScript over to ECMA, a Switzerland-based standards body. This gave three main versions of JavaScript-based languages: JavaScript, which works primarily with Netscape's browsers, JScript, which works with Internet Explorer, and ECMAScript, with which no browser is completely compatible. Netscape and Microsoft have both stated that future versions will match the ECMAScript standard, which should lead to convergence. However, as the most-used features are common to all, compatibility is not an issue unless you are trying to use JavaScript to control DHTML.
__________________________________________

Last edited by gordo; 09-04-2009 at 08:36 AM.
  #3  
Old 10-03-2009, 12:14 AM
fayas444 fayas444 is offline
Registered User
 
Join Date: Oct 2009
Posts: 3
JavaScript started life as LiveScript, but Netscape changed the name, possibly because of the excitement being generated by Java, to JavaScript. The name does confuse people, though, who expect there to be a closer relationship between Java and JavaScript than actually exists. In fact there's little in common between the languages, although some of the syntax looks similar.

The JavaScript language was created by Netscape in 1996 and included in their Netscape Navigator (NN) 2.0 browser via an interpreter that reads and executes the JavaScript included in .html pages. The language has steadily grown in popularity since then, and is now supported by the most popular browsers: those produced by Netscape and Microsoft as well as less widely used browsers like Opera. The good news is that this means JavaScript can be used in web pages for all major modern browsers. The not quite so good news is that there are differences in the way the different browsers implement JavaScript, although the core JavaScript language is much the same.

The great thing about JavaScript is that once you've learned how to use it for browser programming, you can move on to use it in other areas. Microsoft's IIS uses JavaScript to program server-side web pages, PDF files now use JavaScript, and even Windows admin tasks can be automated with JavaScript code.

Last edited by Moonbat; 10-09-2009 at 01:46 PM. Reason: MOD EDIT: Removed spam links
  #4  
Old 10-13-2009, 01:12 AM
tharvi222 tharvi222 is offline
Registered User
 
Join Date: Oct 2009
Posts: 3
JavaScript is the Netscape-developed object scripting language used in millions of web pages and server applications worldwide. Netscape's JavaScript is a superset of the ECMA-262 Edition 3 (ECMAScript) standard scripting language, with only mild differences from the published standard.

Contrary to popular misconception, JavaScript is not "Interpretive Java". In a nutshell, JavaScript is a dynamic scripting language supporting prototype based object construction. The basic syntax is intentionally similar to both Java and C++ to reduce the number of new concepts required to learn the language. Language constructs, such as if statements, for and while loops, and switch and try ... catch blocks function the same as in these languages (or nearly so.)
_________________________________________

Last edited by gordo; 10-13-2009 at 07:10 AM. Reason: remove spam
  #5  
Old 10-13-2009, 01:59 PM
Linda_Pl Linda_Pl is offline
Registered User
 
Join Date: Jul 2009
Posts: 4
What is JavaScript

Just wondering what computing languages people know.

I am good at
Html
Javascript
Css
Php

Im ok at
Flash / Action Script
Java

Learning
Visual Basic
C
Python
Ruby on Rails

I havent done any software programming for a while so im getting back into learning C and maybe visual basic so hopefully soon i can move them up in my list.
__________________
insurance for young drivers
  #6  
Old 10-21-2009, 12:12 AM
jamu jamu is offline
Registered User
 
Join Date: Oct 2009
Posts: 3
Javascript is a programming language that is used to make web pages interactive. It runs on your visitor's computer and so does not require constant downloads from your web site.
***********************************************}

Last edited by gordo; 10-21-2009 at 07:37 AM.
  #7  
Old 11-03-2009, 10:54 PM
azis azis is offline
Registered User
 
Join Date: Nov 2009
Posts: 2
JavaScript is most commonly used as a client side scripting language. This means that JavaScript code is written into an HTML page. When a user requests an HTML page with JavaScript in it, the script is sent to the browser and it's up to the browser to do something with it.
++++++++++++++++++++++++

Last edited by gordo; 11-04-2009 at 07:01 AM.
  #8  
Old 11-05-2009, 07:09 AM
intelmujib intelmujib is offline
Registered User
 
Join Date: Nov 2009
Posts: 2
JavaScript is a simple programming language used to make web pages more interactive. Once known as LiveScript, JavaScript's name was changed as part of a marketing deal between Netscape and Sun. People talk about Java and JavaScript as if they were interchangeable, but they are completely different things. You do not need a Java runtime environment in order to use a JavaScript-enabled web page. See What is Java?

JavaScript code was invented to validate form fields before a form is submitted, saving the user the trouble of waiting to hear back from the web server if the problem is a simple one, like a missing digit in a 10-digit phone number.
___________________________________________________
Tummy Tuck Recovery
Unsecured Business Loans
  #9  
Old 11-11-2009, 12:46 AM
aram624 aram624 is offline
Registered User
 
Join Date: Nov 2009
Posts: 3
JavaScript is an object-oriented[2] scripting language used to enable programmatic access to objects within both the client application and other applications. It is primarily used in the form of client-side JavaScript, implemented as an integrated component of the web browser, allowing the development of enhanced user interfaces and dynamic websites. JavaScript is a dialect of the ECMAScript standard and is characterized as a dynamic, weakly typed, prototype-based language with first-class functions. JavaScript was influenced by many languages and was designed to look like Java, but to be easier for non-programmers to work with.
====================
uk bad credit second mortgage loan
Nashville Real Estate
  #10  
Old 11-11-2009, 06:58 AM
gordo gordo is offline
Moderator
 
Join Date: Apr 2007
Posts: 662
What are the odds tha 7 out of 9 posters on this page have a 122.164.xxx.xxx ip address? Is it time for a ip address range block?
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Powered by vBulletin®
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.