I.T. Discussion Community!
-Collapse +Expand
JavaScript
Search JavaScript Group:

Advanced
-Collapse +Expand JavaScript Store
   ► KBWebsite Scri...JavaScript a...   Print This    All Groups  

JavaScript KB: JavaScript and AJAX Topic

About JavaScript
JavaScript Image
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.

JavaScript is a compact, object-based scripting language for developing client and server Internet applications.

About AJAX
AJAX is a set of JavaScript libraries written in Javascript and allows browser-server communication w/o posting the whole page back and provides an OOP model for the browser.

Topics

49 Articles Found in the JavaScript and AJAX Topic  (or one of the sub-topics in bold above)

  KB Article    

Mike Prestwood
1. A 10 Minute JavaScript Quick Start Short 10 minute getting started JavaScript primer.
Posted to KB Topic: Beginners Corner
16 years ago, and updated 11 years ago

Article
Nothing New Since Your Last Visit
14229
Hits

Mike Prestwood
2. Add Favorites or Bookmark - Works with all browsers. For IE 4+, this script will give visitors to your site the option to add your page to their favorites. For Netscape users it will remind them to press Control + D, for all others, it simply reminds them to bookmark your page.
Posted to KB Topic: Coding Tasks
16 years ago, and updated 11 years ago

KB Post
Nothing New Since Your Last Visit
15700
Hits

Wes Peterson
3. ASP .NET AJAX Is Here! After a vigorous beta cycle, Microsoft has released it's Ajax implementation. And it's free!
Posted to KB Topic: AJAX Libraries
12 years ago, and updated 12 years ago

News
Nothing New Since Your Last Visit
4084
Hits

Mike Prestwood
4. Associative Arrays in JavaScript

An associative array links a set of unique values (keys) to another set of values (not necessarily unique). Associative arrays are also known as a dictionary or a hash table in other languages.

11 years ago

Code
Nothing New Since Your Last Visit
12690
Hits

Mike Prestwood
5. Browser Size How do you specify the browser size of a window in a link?
11 years ago

FAQ
Nothing New Since Your Last Visit
8358
Hits

Mike Prestwood
6. Checking if a field is blank How to validate form field is blank or not using JavaScript.
Posted to KB Topic: Coding Tasks
16 years ago, and updated 11 years ago

KB Post
Nothing New Since Your Last Visit
5821
Hits

Mike Prestwood
7. Close Browser with JavaScript How do you close a browser in a link?
Posted to KB Topic: Beginners Corner
11 years ago
(1 Comments , last by Anonymous )

FAQ
Nothing New Since Your Last Visit
10583
Hits

Mike Prestwood
8. Hide JavaScript Code How do I protect my javascript code?
Posted to KB Topic: Beginners Corner
11 years ago

FAQ
Nothing New Since Your Last Visit
8546
Hits

Douglas.M
9. How I Get Around Web Page Reciprocal Linking

This article describes a Javascript coding technique I use to avoid reciprocal linking between web pages.

Posted to KB Topic: OOP
6 months ago

Article
Nothing New Since Your Last Visit
105
Hits

Mike Prestwood
10. JavaScript JavaScript is a platform-independent, event-driven, interpreted programming language developed by Netscape Communications Corp. and Sun Microsystems. Originally called LiveScript (and still called LiveWireTM by Netscape in its compiled, server-side incarnation), JavaScript is affiliated with Sun's object-oriented programming language JavaTM primarily as a marketing convenience. They interoperate well but are technically, functionally and behaviorally very different.
11 years ago

Definition
Nothing New Since Your Last Visit
8646
Hits

Mike Prestwood
11. JavaScript Assignment (=)

JavaScript uses = for it's assignment operator.

Posted to KB Topic: Beginners Corner
11 years ago, and updated 11 years ago

Code
Nothing New Since Your Last Visit
6257
Hits

Mike Prestwood
12. JavaScript Associative Array (Array(), use [)

General Info: Associative Array

A set of unique keys linked to a set of values. Each unique key is associated with a value. Think of it as a two column table. MyArray['CA'] = 'California' MyArray['AR'] = 'Arizona'

Languages Focus: Associative Array

Associative arrays are also known as a dictionary or a hash table in other languages.

JavaScript Associative Array

Posted to KB Topic: Language Reference
11 years ago, and updated 10 years ago

Code
Nothing New Since Your Last Visit
8420
Hits

Mike Prestwood
13. JavaScript Case Sensitivity (Yes)

JavaScript is case sensitive. Change the case, and it no longer works! Notice the "W" in "Write" is capitalized.

<script language=JavaScript>
<!--
document.Write("Hello"); //Does not work!
//-->
</script>

Variable names are case sensitive.

11 years ago, and updated 10 years ago

Code
Nothing New Since Your Last Visit
7714
Hits

Mike Prestwood
14. JavaScript Class..Object (Limited, class..new)

Creating classes in JavaScript is not really OOP, but rather a super type. That is, a type that has some class-like features but is missing the necessary OOP requirements.

There is nothing in Javascript to stop you from accessing the functions within your class outside of the class so this is not fully OOP but is usable.

Posted to KB Topic: Language Reference
11 years ago, and updated 10 years ago

Code
Nothing New Since Your Last Visit
6969
Hits

Mike Prestwood
15. JavaScript Code Blocks ({ })

Inhtml pages, you embed JavaScript code between <script> and </script> (see example). Also it's tradtional to put an HTML comment around your code too so that really old browsers don't crash (probably not all that important these days).

For JavaScript, Java, PHP, and C++, I prefer to put the first { at the end of the first line of the code block as in the example above because I see moreJavaScript codeformatted that way.

11 years ago, and updated 10 years ago

Code
Nothing New Since Your Last Visit
8875
Hits

Mike Prestwood
16. JavaScript Comments (// or /* ... */)

Commenting Code
JavaScript uses "//" for a single line comment and /* */ for a multiple line comment.

Posted to KB Topic: Beginners Corner
11 years ago, and updated 10 years ago

Code
Nothing New Since Your Last Visit
6265
Hits

Mike Prestwood
17. JavaScript Comparison Operators (==, !=)

Common comparison operators:

== equal
!= not equal
< less than
> greater than
<= less than or equal
>= greater than or equal

Posted to KB Topic: Beginners Corner
10 years ago

Code
Nothing New Since Your Last Visit
9267
Hits

Mike Prestwood
18. JavaScript Custom Routines (function)

JavaScript uses functions and loosely typed parameters. Function definitions must come before their usage so the usual preference when adding JavaScript to HTML pages is to include them between the head tags.

Posted to KB Topic: Language Reference
11 years ago, and updated 11 years ago

Code

KB Post
Nothing New Since Your Last Visit
11038
Hits

Mike Prestwood
19. JavaScript Defined What is JavaScript?
Posted to KB Topic: Beginners Corner
11 years ago

FAQ
Nothing New Since Your Last Visit
8897
Hits

Mike Prestwood
20. JavaScript Development Tools

Languages Focus: Development Tools

Primary development tool(s) used to develop and debug code.

JavaScript Development Tools

Many developers just use a text editor. There are JavaScript editors available including 1st JavaScript Editor, Antechinus JavaScript Editor Professional, and SplineTech JavaScript Debugger PRO.

Posted to KB Topic: Beginners Corner
11 years ago, and updated 10 years ago

Code
Nothing New Since Your Last Visit
6719
Hits

Mike Prestwood
21. JavaScript End of Statement (; is optional)

In JavaScript, using a semicolon at the end of statements is optional. You might think a semicolon then is just another comment specifier but it is not. The semicolon is an optional end of statement specifier. To put two statements on a single code line, you must use a semicolon. However, the semicolon is optional, but probably confusing, when you break a single statement into multiple code lines.

Posted to KB Topic: Beginners Corner
11 years ago, and updated 10 years ago
(4 Comments , last by henewud.m )

Code
Nothing New Since Your Last Visit
9920
Hits

Mike Prestwood
22. JavaScript Event Handler

The JavaScript event handler contains events centered around the Document Object Model (DOM). Common events include onMouseOver and onMouseOut, onFocus and onBlur, onClick and onDblClick, onChange and onSelect, onLoad and onUnload.

For example, onMouseOver and onMouseOut are frequently used with websites to change an image when your mouse moves over it. The onClick event is used to trigger code upon a mouse click.

10 years ago

Code
Nothing New Since Your Last Visit
9754
Hits

Mike Prestwood
23. JavaScript Event Model Description of the JavaScript event handlers.
Posted to KB Topic: Beginners Corner
16 years ago, and updated 11 years ago

Article
Nothing New Since Your Last Visit
15228
Hits

Mike Prestwood
24. JavaScript Exception Trapping (try/catch/finally)

See "throw" to raise (throw) an error.

11 years ago, and updated 11 years ago

Code
Nothing New Since Your Last Visit
6008
Hits

Mike Prestwood
25. JavaScript FAQ JavaScript frequently asked questions.
Posted to KB Topic: Beginners Corner
16 years ago, and updated 11 years ago

KB Post
Nothing New Since Your Last Visit
5964
Hits

Mike Prestwood
26. JavaScript File Extensions

.js is the common standard for browser-side JavaScript and .jsp is the common standard for server-side JavaScript.

11 years ago, and updated 10 years ago

Code
Nothing New Since Your Last Visit
5973
Hits

Mike Prestwood
27. JavaScript If Statement (if..else if..else)

Same as C/C++ but, as usual, the semicolons are optional.

Posted to KB Topic: Beginners Corner
10 years ago
(1 Comments , last by Anonymous )

Code
Nothing New Since Your Last Visit
7261
Hits

Mike Prestwood
28. JavaScript Inheritance (No, but sort of.)

JavaScript does not offer a formal inheritance machanism. There are some tricks some developers are fond of.

11 years ago, and updated 10 years ago

Code
Nothing New Since Your Last Visit
8537
Hits

Mike Prestwood
29. JavaScript Inheritance-Multiple (Not Supported)

There is a trick to fake one descendant class multiple inheritance. Not really worth exploring though but...inside a constructor, call another constructor function. The new object instance will inherit any properties and methods defined in that constructor. However, the new object will not inherit methods defined in the second constructor's prototype chain.

Posted to KB Topic: OOP
11 years ago, and updated 10 years ago

Code
Nothing New Since Your Last Visit
6128
Hits

Mike Prestwood
30. JavaScript Literals (quote or apostrophe)

Literals use either an apostrophe (also known as a single quote) as in 'Prestwood' or quoted as in "Prestwood". If you need to embed an apostrophe in an apostrophe-literal or a quote in a quoted-literal, preced it with a slash as in \' and \".

Posted to KB Topic: Beginners Corner
11 years ago, and updated 10 years ago
(1 Comments , last by Anonymous )

Code
Nothing New Since Your Last Visit
13044
Hits

Mike Prestwood
31. JavaScript Logical Operators

JavaScript logical operators:

and, && and, as in this and that
or, || or, as in this or that
!, Not Not, as in Not This

Posted to KB Topic: Beginners Corner
10 years ago

Code
Nothing New Since Your Last Visit
8171
Hits

Mike Prestwood
32. JavaScript Member Method

Not fully OOP as you can call the method outside of the class.

11 years ago, and updated 10 years ago

Code
Nothing New Since Your Last Visit
7470
Hits

Mike Prestwood
33. JavaScript Operators Javascript operators: assignment, comparison, computational, and logical.
Posted to KB Topic: Language Reference
16 years ago, and updated 11 years ago

KB Post
Nothing New Since Your Last Visit
24468
Hits

Mike Prestwood
34. JavaScript Overloading

JavaScript Overloading

  • Operator - No.
  • Method -
Posted to KB Topic: Language Reference
11 years ago, and updated 10 years ago

Code
Nothing New Since Your Last Visit
7373
Hits

Mike Prestwood
35. JavaScript Overview and History

Language Overview: Class-like language with limited but usable class-like and object-like functionality but no formal inheritance nor visibility control, etc.

Target Platforms: JavaScript is most commonly used to extend HTML by executing code on the browser side when visiting a website. It does have other uses including server side scripting and AJAX.

Posted to KB Topic: Beginners Corner
11 years ago, and updated 10 years ago

Code
Nothing New Since Your Last Visit
7392
Hits

Mike Prestwood
36. JavaScript Report Tools Overview

No built-in report writer but because JavaScript most frequently targets website development (a document interfaced GUI), a common solution is to simply output an HTML formatted page with black text and a white background (not much control but it does work for some situations).

Posted to KB Topic: Beginners Corner
10 years ago

Code
Nothing New Since Your Last Visit
14520
Hits

Mike Prestwood
37. JavaScript Reserved Words JavaScript reserved words
Posted to KB Topic: Language Reference
16 years ago, and updated 11 years ago

KB Post
Nothing New Since Your Last Visit
7080
Hits

Mike Prestwood
38. JavaScript Seconds Count Down How do you do a really simple 30 second countdown in JavaScript?
Posted to KB Topic: Coding Tasks
11 years ago

KB Post
Nothing New Since Your Last Visit
10996
Hits

Mike Prestwood
39. JavaScript Similiar to C How is JavaScript syntax like C / C++?
11 years ago

FAQ
Nothing New Since Your Last Visit
8529
Hits

Mike Prestwood
40. JavaScript String Concatenation (+)

To concatenate two strings, a string to an integer, or a string to a floating point number, use the + operator. JavaScript performs implicit casting when concatenating a string and a number. For example, to convert a floating point number to a string just concatenate an empty string to the number as in "" + 3.2.

Posted to KB Topic: Beginners Corner
11 years ago, and updated 10 years ago

Code
Nothing New Since Your Last Visit
8304
Hits

Mike Prestwood
41. JavaScript substr

Above returns "Mike P".

SubStr(StartIndex, NumberOfCharacters)

Notice JavaScript is 0 based (the first character is character 0).�0 is start character, 6 is number�of characters).�

You can also use substring where both numbers are indexes:

SubString(StartIndex, EndIndex)

The following returns "re".

var sName;
sName = "Mike Prestwood";
sName = sName.substring(6, 8);
document.write(sName);
11 years ago, and updated 11 years ago

Code
Nothing New Since Your Last Visit
7825
Hits

Mike Prestwood
42. JavaScript Unary Operators

An operation with only one operand (a single input). JavaScript unary operators include ++ and --. They can be used either before or after a variable as in: a++, b--, and ++a, and --b.

Posted to KB Topic: Beginners Corner
11 years ago, and updated 10 years ago

Code
Nothing New Since Your Last Visit
7906
Hits

Mike Prestwood
43. JavaScript Variables (var x = 0;)

JavaScript is a loosely typed language. Each variable is cast in usage as string, number, boolean, function, or object.

Variable names are case sensitive.

Alternatively, you can specify the value when you declare a variable:

var FirstName = "Mike";
var LastName = "Prestwood";
var Age = 42;
Posted to KB Topic: Beginners Corner
11 years ago, and updated 10 years ago

Code
Nothing New Since Your Last Visit
6836
Hits

Mike Prestwood
44. JavaScript versus JScript JScript is Microsoft's implementation of JavaScript.
17 years ago

KB Post
Nothing New Since Your Last Visit
8970
Hits

bhavyait
45. replaceAll

Implements replaceAll in javascript. This is achieved using prototype.js

12 years ago, and updated 11 years ago

Code
Nothing New Since Your Last Visit
13397
Hits

Mike Prestwood
46. Share data From ASP To JavaScript How do you pass values from ASP to Javascript in the same page?
11 years ago

FAQ
Nothing New Since Your Last Visit
8695
Hits

Mike Prestwood
47. Specify browser size with Javascript How to specify browser size with Javascript.
Posted to KB Topic: Coding Tasks
13 years ago, and updated 13 years ago

KB Post
Nothing New Since Your Last Visit
9552
Hits

Mike Prestwood
48. Validating Form Fields Adding JavaScript to your HTML forms to validate form fields.
Posted to KB Topic: Beginners Corner
11 years ago, and updated 11 years ago

Article
Nothing New Since Your Last Visit
11378
Hits

Mike Prestwood
49. You Are Here Location Script A Javascript "You are here:" location script that uses your folder path to indicate location.
Posted to KB Topic: Coding Tasks
11 years ago
(1 Comments , last by Anonymous )

KB Post
Nothing New Since Your Last Visit
9078
Hits

Icon Legend:
Recent or not:
- Recent activity (within last two weeks).
- No activity last two weeks.
 Since your last logged visit:
- New to you or updated since your last visit (sign in now to activate).
- NOT new to you since your last visit (sign in now to activate).

New JavaScript and AJAX Knowledge Base Post...

Share your knowledge with the WORLD! In addition to adding comments to existing posts, you can post knowledge you've acquired. We welcome full articles (intro with screen shots), general posts (shorter), and tidbits (tips, FAQs, definitions, etc.).

Post New...

Tidbit Post: Short Flashcard FAQ Definition Quick Tip Code Snippet
Longer Post: Full Article General Post File Link Error News
Other: Blog Topic
Or, if YOU have a question...
  JavaScript and AJAX Message Board

Follow PrestwoodBoards on: 


©1995-2019 PrestwoodBoards  [Security & Privacy]
Professional IT Services: Coding | Websites | Computer Tech