Wednesday, November 16, 2011

Introduction to Javascript For Newbies


Javascript is a client-side programming language whose processing engine is embedded in web browsers like Internet Explorer, Netscape, Firefox, etc. This enables the processing engine to read and interpret web pages that contain the javascript code when browsing.

Javascript first made an appearance in 1995, although by that time it was known as Livescript. This name was later changed to javascript.

Javascript was invented to add more exciting features to HTML pages. HTML on it's on is pretty boring and it cannot do much besides display a webpage. Javascript programming, on the other hand, can provide a host of exciting features like perform calculations, allows the user to interact with webpages, perform form validations, manipulate elements on a webpage, provide excellent visual effects, enables dynamic functions and so much more.

All of this provides the user to the site with an enhanced user experience. Because javascript is a client-side language, all of these features are available in real time without the browser having to refer to the server all the time. This prevents time delays and increases user satisfaction.

Let's take a closer look at the great things you can do with javascript programming:

Perform Calculations

Javascript can be used to perform simple to advanced mathematical calculations. This is especially useful if you want your users to interact with your site by inputting some information that requires some sort of calculation and displaying the relevant content based on that result. For example, javascript can calculate a loan repayment and display the appropriate result if a user enters a required loan amount on the site. Furthermore, javascript can also tell date and time, time a certain activity and perform intricate date and time calculations.

User Interaction

The javascript on the webpage can take interaction from a user and perform a certain function by way events. Some of the most popular events are:

onblur

onchange

onclick

ondblclick

onfocus

onkeydown

onkeypress

onkeyup

onload

onmousedown

onmousemove

onmouseout

onmouseover

onmouseup

onselect

onsubmit

Perform Form Validations

Javascript can validate and check user input to determine whether it conforms to a certain requirement. For example, you can check if a field is left empty, if an email address is in the proper format, if a zip code code is in the proper format, etc. In most cases, if an error is made by your site visitor, an alert can display the appropriate error message to him or her.

Manipulate Elements On A Webpage

Javascript allows a user to change content or styles of a webpage upon a user interaction by way of the

aforementioned events. For example, hovering over a certain text can make an image appear, text on a submit button can change on submit, etc.

Provide Visual Effects

Javascript has a host of ways to provide visual effects to a webpage that other server-side programming languages cannot. A typical example of this might be some fancy image rollover buttons.

Enables Dynamic Functions

Javascript, together with AJAX (asynchronous JavaScript and XML), can be used to create dynamic applications. One example of this is to load dynamic content onto a webpage without refreshing the page.

In my next chapter, we will delve further into javascript programming.




Susan Lang is a web developer who also teaches people how to use javascript on their sites. You are welcome to access free javascript training tutorials on: http://www.toknowmore.net/e/1/javascript/




Tuesday, November 15, 2011

How to Get Rid of the JavaScript Warning on Internet Explorer


JavaScript is the standard programming language for web pages on the internet. JavaScript errors are bugs in the programming code for a page.

Back at the dawn of the internet, web pages were limited to using the Hypertext Markup Language (HTML). HTML is a standard used by all browsers to display web pages. HTML handles things like font styles, links, and pictures, which was enough at first, but people wanted to do more with web pages.

Netscape used a simple programming language developed for JavaScript so that even non-programmers could enhance their websites with functionality that is more sophisticated. The language itself has become more sophisticated and is now a standard which, like HTML, is supported by all web browsers.

JavaScript was not designed to run extremely complex programs; it was designed for simple enhancements to web pages. As the internet has evolved, the programming behind web pages has become more complex, often straining the limits of JavaScript. To alleviate the problem some of the programming has been offloaded to servers rather than trying to download it all onto your computer.

JavaScript, which runs locally, is currently used heavily by websites to drive their user interfaces. Although many modern websites communicate with servers to get their data, that communication can be slow or even fail altogether. It is important for the user interface to be responsive even if there is a problem with the server, so the interface is usually written in JavaScript and run locally from your computer, while the more complex code runs on a server.

As with any programming language, JavaScript will have bugs in it, and sometimes they will cause the program to fail. Fortunately, unlike a desktop program, when a JavaScript program fails, the rest of the page usually still works fine.

Getting Rid of the JavaScript Warning Dialog on Internet Explorer

Most JavaScript errors you get are due to a failure in a single webpage. Usually these errors are harmless: Although you may lose some functionality, they are not a danger to your computer.

However, Internet Explorer pops up a warning dialog by default. This warning stops you from doing anything on the page and can be annoying. If you are a programmer it may be interesting to look at the code, but for the rest of us it is not very useful.

To get rid of the dialog, follow these steps:

1. In Internet Explorer, select Internet Options from the Tools menu.

2. Click on the Advanced tab.

3. Depending on your version there may be up to three checkboxes you need to set (two of them checked, one unchecked):

o Check: Disable script debugging (Internet Explorer)

o Check: Disable script debugging (Other)

o Uncheck: Display a notification about every script error

4. Click the OK button.

This should stop the warning dialog from showing. If you start having problems with many web pages, there may be a problem with your browser, not with the web page, and you may need to reinstall Internet Explorer.




Boost-Your-PC-Performance can provide you with advanced registry cleaning technology. It will scan, diagnose, and fix javascript errors [http://www.boostyourpcperformance.com/2010/01/why-some-javascript-errors-are-not-always-javascript-errors/], leaving you with nothing but a highly optimized PC.




Monday, November 14, 2011

How to Solve the Javascript Void(0) Problem


Many internet users face this problem when they try clicking a link and see this error code on the status bar of the browser which doesn't allow the link to work. It is actually an error message that occasionally appears in a web browser when you face a problem loading a JavaScript from a webpage. Though this error message pops up on various occasions but the actual reasons could be different for different users, and resolving these problems is necessary by knowing the most possible reasons for this error message.

1- The major cause of this error message is the Popup blocker blocking the JavaScript while stopping the windows which open up as the advertisements on various sites. Resolving this problem involves making changes in the preferences of the popup blocker based on your requirements and thus disabling the popup blocker. One can even download another anti popup software instead or can read the product reviews of popup blockers to assess if they really cause these error messages.

2- The malfunctioning of the web proxy servers (which are used for accessing the various banned websites) can also block the various scripts in the process. This problem can be avoided by not using the proxy server itself or using a proxy server that functions better and do not interfere in the downloading of various scripts. Also check for the compatibility of the proxy server with various web pages and scripts.

An improperly written JavaScript could also lead to this error message. The solution lies in notifying this error to the webmaster who in turn must rewrite the JavaScript.

3- The JavaScript might be disabled in your browsers, and this needs to be enabled. To enable this in IE, go to scripting tab of the security option in the Tools menu under the internet options; and to enable this in Firefox, go to Tools menu and enable the JavaScript option in Web features.

4- Web browser implementation of JavaScript might also be broken in some cases, and this requires the switching or simply the up gradation of your web browser.

There is this simple way where you can really avoid "javascript:void(0)" error message at the first instance because we know that this "javascript:void(0)" can cause certain browsers to really present your web pages in unusual ways, and since the "javascript:void(0)" statement is often occurred when a link has no URL attached to it, and the browser doesn't understand how to react and returns the error message. So for this, instead use the "return false;" statement to let the browser not to look for the URL. Try opening the document in any text editor; Locate the "javascript:void(0)" references within the document, Replace the links with the (#) symbol with the syntax ".", Add the "return false" declaration to the statement that would make the whole link reference to appear as a Link. Replace the "callFunction()" with your function name; Save and close the file finally.




Here I am going to share an informative resource of javascript:void(0)
You can find more information about how you can avoid javascript:void(0) problem here.




Sunday, November 13, 2011

Why You Should Learn JavaScript


Since the beginning of the web, there have been focus on different techniques for building websites. In the beginning, a lot of the focus was on the browsers and what you could achieve with the different versions of HTML supported in those browsers. As the browsers got better and better they also supported JavaScript for adding interaction to the web pages through a scripting interface. We saw a lot of web pages with a lot of JavaScript in the end of 90's and the beginning of the millennium, but there were no standards, and of course it was a mess to maintain websites that had a lot of JavaScript in them.

The IT bubble burst and JavaScript was thrown out, and focus was more on implementing everything server side. People working with front-end related activities focused their efforts on CSS, as browsers started to live up to standards where it was possible to separate content and look-and-feel with XHTML and CSS. For almost 3 years focus was on separating content from design, and front-end from back-end, but soon, around 2005, people felt that the interactivity on the web had declined and with browser supporting standards, maybe we could start looking at JavaScript again with different goggles. We saw the birth of AJAX and JavaScript libraries such as Prototype, jQuery, MooTools, Dojo and likes. From now on a lot of the people focusing on front-end development started looking into the possibilities that opened up utilizing JavaScript in their websites and online web software.

Today we see that a lot of web services open up external api:s letting developers request data from other websites, integrating them into their websites, creating so called mash ups. Google, Yahoo and other large companies open up their JavaScript libraries and api:s enabling developers to create even more complex web solutions. In the next couple of years JavaScript will also grow stronger on the server side with solutions such as Aptana Jaxer, Rhino and SpiderMonkey. Developers working with web sites and solutions that are built as web solutions better start learning JavaScript.




Mattias Hising runs the blog FrontEndBook.com, FrontEndBook.com offers in-depth articles on JavaScript, learning their subscribers techniques such as JavaScript form validation and everything about jQuery.




Saturday, November 12, 2011

Javascript Error - The Things You Should Do to Fix Javascript Errors


JavaScript is a scripting program that is commonly used by website builders and developers in order to create a fully functional webpage or website. All the animations that are used in websites including the visual effects are all created with the help of JavaScript.

It takes a lot of time to fully understand how JavaScript works and how to make a website function properly. It requires a lot of encoding and scripting, and as you familiarize yourself with JavaScript, there will be unexpected pop-up error messages. JavaScript basically is what makes a website and what binds its functions together. However, errors in JavaScript can ruin a fully functional website and it will cause frequent crashes while others are visiting your website.

Here are some of the tips that will prevent you from experiencing JavaScript errors and will allow you to surf the internet properly:

1. Having a lot of JavaScript errors while browsing a website can be annoying for anyone and in order to fix it, all you have to do is to turn off the JavaScript alert. These alerts can cause computer freezes or crashes. It is important to turn theses alerts off in order to prevent a computer crash while browsing the internet

Firefox users can turn off JavaScript error alerts by following these simple steps:

- Click the Tools tab that is located on the topmost part of your browser.

- Click Options and then select the Content Tab.

- Look for the Enable JavaScript option and leave the box uncheck to disable the JavaScript.

Internet Explorer users can turn off JavaScript error alerts by following these simple steps:

- Click the Tools tab that is located on the topmost part of your browser.

- Click the Internet Options then select the Advanced Tab

- Uncheck the box located next to the phrases Display a Notification about Every Script Error.

This will disable the pop up message but it won't actually fix the problem. Here is the next thing that you should do to remove JavaScript errors from your system.

2. Changing the browser that you are using can prevent JavaScript errors from occurring. Firefox for example can detect more errors compared to Internet Explorer. Try switching between several browsers and see what is compatible with your system. You can try Opera Browser, Google Chrome, Maxthon Browser, Safari Browser, Mozilla Firefox, and Internet Explorer.

3. Clean your registry

In order to permanently get rid of JavaScript errors all you have to do is to clean your registry database by using an exceptional registry cleaner. Cleaning your registry regularly will not only get rid of JavaScript errors but will also keep your computer clean from several errors that are caused by a messy registry.




Best Registry Cleaner: Serving Over 6 Million IT Professionals Worldwide

Wilson S. Miller is an award winner registry cleaner programmer for top software companies for the last 8 years.
Top Registry Cleaner: As Seen on CNET




Friday, November 11, 2011

Javascript Error - Four Steps to Fix JavaScript Errors


JavaScript is what makes a website around the internet work; it is responsible for all the visual effects, animations, and other website functions. JavaScript makes a website fully functional and makes it visible to other people. Understanding how JavaScript works takes a lot of time and as you familiarize yourself with JavaScript, you will encounter errors that are associated with JavaScript. It is the basic foundation of a website and if your website has invalid entries it will result to JavaScript error message boxes.

If your computer is prompting you with JavaScript errors while browsing your site or another website, try these simple steps and say goodbye to JavaScript errors:

1.) Turn off JavaScript Alerts

The first thing that you should do, before fixing JavaScript errors, is to turn off the error message prompts. These will cause your computer to hang and will sometimes crash, this is annoying if you are trying to fix JavaScript errors. Once turned off you can enjoy surfing without worrying about sudden error pop-ups.

For Mozilla Firefox users:

a.) Go to the Tools tab in the menu bar located at the topmost part of your browser.

b.) Click the Options menu and then select Content Tab

c.) Look for the Enable JavaScript option and make sure that the box next to it is unchecked.

For Internet explorer users:

a.) Go to the Tools tab in the menu bar located at the topmost part of your browser.

b.) Click on Internet Options, and then select the Advanced Tab

c.) Look for the "Display a Notification about Every Script Error" and make sure that the box next to it is unchecked.

2.) Change your Internet Browser

Different browsers have different reactions of JavaScript errors. Try different browser and use the one works best with your system. Some of the browsers that are available today are: Maxton, Opera, Google Chrome, Crazy Browser, Mozilla Firefox, Safari, and Internet Explorer.

3.) Try another computer.

You can also try another computer and see if it still prompts you with the same error message. If it is, then the problem is on the other side of the website and not yours.

4.) Clean your registry

One of the most common causes of JavaScript errors is a corrupted registry file. Not only does it cause JavaScript errors, it also brings you errors such as computer slowdown and system crash. Use a registry cleaner to wipe out all the corrupted registry keys present in your system. This will set you free from JavaScript errors and all the other problems caused by corrupted registry keys.




Best Registry Cleaners: Serving Over 6 Million IT Professionals Worldwide. Protect your investment and ensure maximum PC speed and performance with RegCure registry cleaner. Top Registry Cleaner: As Seen on CNET: Compatible with all Microsoft products and third party applications.




Thursday, November 10, 2011

The Age of Javascript is Here


Web 2.0 has seen the resurrection of Javascript. This is quite amazing when you consider how it was misused like animated GIFs or Java applets previously were.

Many of today's key Web 2.0 sites are heavily reliant on Javascript for slick presentation. Some Javascript effects are almost rivalling Flash in their aesthetic attractiveness and complexity.

Software makers, and in particular Mozilla, Apple and Google are tripping over themselves to make sure their own particular browsers - Firefox, Safari and Chrome - give the best Javascript performance.

The recent version of Firefox included the TraceMonkey JavaScript engine and which made 3.5 twice as fast as version 3 and over ten times faster than version 2.

Google's Chrome is at the moment the champion Javascript-friendly browser, with the latest release scoring 709ms on the Sunspider Javascript benchmarker, beating Safari 4 with 910ms and Firefox, Opera and Internet Explorer following behind.

This outstanding performance will filter down to ordinary users as developers will design more complex Javascript applications and sites to take advantage of the new technology.

Ordinary users will notice the difference too in their email clients which will load a lot faster than previously.

For front-end developers, the advent of the JQuery Javascript library has taken hold across the industry and is just as revolutionary as the introduction of CSS. The whole concept of JQuery is based on the undeniable premise of web design: 'separate content, behaviour and presentation'; and this concept dramatically simplifies development and maintainability.

Other popular Javascript frameworks and libraries include Prototype, Yahoo! UI Library (YUI) and MooTools.

No doubt you are also familiar with the term AJAX which has been as ubiquitous as the term Web 2.0 over the last five years. AJAX is a shorthand for asynchronous JavaScript and XML, with the client-side scripting language being used as the glue to bring together HTML and XML. This technique for data presentation has been widely used in recent times and has presented to the web community another reason to use Javascript.

The Google crawler too has become far better at reading the language whereas before it would have trouble following links written with Javascript.

There are still accessibility issues with this script though and as a rule all essential features that is used for on a site should still function equally well if it is turned off in the browser.

It is still the case though that the main reason why anybody should use Javascript is for form validation. Using a client-side script for this purpose lessons the burden on server resources but also provides a more user-friendly approach than using a server-side script and CSS alone.

So if you are a web designer it really is worth thinking about learning Javascript as it will undoubtedly be a vital element of online creativity in the years and decades to come.




Andy Walpole is a web designer and developer: http://www.suburban-glory.com