Tuesday, May 15, 2012

History of Javascript.



JavaScript was originally developed by Brendan Eich of Netscape under the name Mocha, which was later renamed to LiveScript, and finally to JavaScript mainly because it was more influenced by the Java programming language.[9][10] LiveScript was the official name for the language when it first shipped in beta releases of Netscape Navigator 2.0 in September 1995, but it was renamed JavaScript in a joint announcement with Sun Microsystems on December 4, 1995,[11] when it was deployed in the Netscape browser version 2.0B3.[12]
The change of name from LiveScript to JavaScript roughly coincided with Netscape adding support for Java technology in its Netscape Navigator web browser. The final choice of name caused confusion, giving the impression that the language was a spin-off of the Java programming language, and the choice has been characterized by many as a marketing ploy by Netscape to give JavaScript the cachet of what was then the hot new web programming language.[13][14] It has also been claimed that the language's name is the result of a co-marketing deal between Netscape and Sun, in exchange for Netscape bundling Sun's Java runtime with its then-dominant browser.

JavaScript very quickly gained widespread success as a client-side scripting language for web pages. As a consequence, Microsoft named its implementationJScript to avoid trademark issues. JScript added new date methods to fix the Y2K-problematic methods in JavaScript, which were based on Java'sjava.util.Date class.[15] JScript was included in Internet Explorer 3.0, released in August 1996.
In November 1996, Netscape announced that it had submitted JavaScript to Ecma International for consideration as an industry standard, and subsequent work resulted in the standardized version named ECMAScript.[16]
JavaScript has become one of the most popular programming languages on the web. Initially, however, many professional programmers denigrated the language because its target audience was web authors and other such "amateurs", among other reasons.[17] The advent of Ajax returned JavaScript to the spotlight and brought more professional programming attention. The result was a proliferation of comprehensive frameworks and libraries, improved JavaScript programming practices, and increased usage of JavaScript outside of web browsers, as seen by the proliferation of server-side JavaScript platforms.
In January 2009, the CommonJS project was founded with the goal of specifying a common standard library mainly for JavaScript development outside the browser.[18]

What is Javascript?



JavaScript
 is a prototype-based scripting language that is dynamicweakly typed and has first-class functions. It is a multi-paradigm language, supportingobject-oriented,[5] imperative, and functional[1][6] programming styles.
JavaScript was formalized in the ECMAScript language standard and is primarily used in the form of client-side JavaScript, implemented as part of a Web browser in order to provide enhanced user interfaces and dynamic websites. This enables programmatic access to computational objects within a host environment.

Source : http://en.wikipedia.org/wiki/JavaScript

Monday, June 6, 2011

how to get the currency code for current store in magento?

// Currency Code for Bangladesh is "BDT"
Mage::app()->getStore()->getCurrentCurrencyCode();

Source : http://harisur.net/how-to-get-the-currency-code-for-current-store-in-magento

how to get the currency symbol for current store in magento?

// Currency Symbol for Bangladesh is "Tk"
Mage::app()->getLocale()->currency(Mage::app()->getStore()->getCurrentCurrencyCode())->getSymbol();

Source : http://harisur.net/how-to-get-the-currency-symbol-for-current-store-in-magento

how to define the product price with default currency format in mageto?

normally $_product->getPrice() method return the product price in basic number format with 4 digits after decimal point, it’s look like 123.4567.
But the default currency format of magento is $123.46. see, default currency format done round with 2 digits after decimal point. and another important thing is, it’s put the currency code before the price.
lets see how to do that…
echo $_product->getPrice();
// will display : 123.4567
echo Mage::helper('core')->currency($_product->getPrice());
// will display : BDT123.46 [BDT, currency code of Bangladesh]

Source : http://harisur.net/how-to-define-the-product-price-with-default-currency-format-in-mageto