Blog Archives

You can learn here basics about javascript.

How to validate a form while using a multiple submit button

As we have seen already about Javascript Form validation, let us now see how to validate a form while using multiple submit button. Usually a form has a single submit button but sometimes it might need more than one submit

Posted in Html, Javascript Tagged with: ,

Javascript code for creating a POP-UP window

We have already seen about creating a POP-UP menus using javascript. Let us see how to create a POP-UP window using javscript. Now we are going create code html file and we are going to add the link, whenever the

Posted in Javascript Tagged with: , ,

How to use javascript pop-up menus

Javascript has three types of popup boxes Alert Confirm Prompt ALERT Javascript alert are the kind of ¬†information to the user. If you have not enabled the JavaScript on your web browser, then you may not able to get “alert”

Posted in Javascript Tagged with: ,

Javascript for…in loop

Javascript for loop is used to do a set of operations many times. At the same time for…in is used to loops through properties of an object SYNTAX: for (variable in object) { //statements } EXAMPLE: OUTPUT: XXX 1 92.5

Posted in Javascript Tagged with:

Validating url using javascript

Some times we might need to check if the url entered by the user in the text box is a valid one or not. Here is a sample code to check that. <html> <head> <script> function checkUrl() { var theUrl=document.getElementById(‘url’).value;

Posted in Javascript Tagged with: ,

Javascript to count the number of times user clicks on a button

In some scenarios we might need to count the number of times a particular user has clicked a button or any other element in a web page. There is no direct way like a static variable to count the number

Posted in Javascript Tagged with: , , ,

Javascript code for changing list box (select tag) value based on change in another listbox

Javascript can be effectively used for dynamically changing value in one drop down list (i-e select/option tag) when a value in another related drop-down list is changed. Assume that a webpage is having list of names in one drop-down list

Posted in Javascript Tagged with: ,

Email syntax validation using javascript

We should validate the syntax of email entered in the form in the client side itself to save unnecessary server process to validate the email. It can be done using javascript. Consider below form. onSubmit event of Form is calling a

Posted in Javascript Tagged with: ,

Allowing Users to Change attribute of the HTML tag using javascript

Normally we will set values for attributes of HTML tag during design time. But each user will be expecting different values. For example “scrollamount=’2′” set in marquee tag may not be suitable for all users. Some people will expect more

Posted in Html, Javascript Tagged with: ,

Dynamically changing/displaying web page content using javascript without refreshing the page

Sometimes we may need to change the content displayed in the webpage frequently. Javascript will enable achieving this without the need for refreshing the webpage.(i-e without requesting the page again). Below steps are needed for doing this. – All the

Posted in Javascript, jQuery Tagged with: ,