A simple AJAX tutorial

Rating 2.00 out of 5

AJAX powered webpages have an edge when response time and resource usage is the matter of concern. AJAX shows quick results within a blink of an eye. And the best part is user never gets to see the whole page refreshed again for simple responses.

Lets create a simple AJAX implemented webpage. and see how it works.

Create an . . . → Read More: A simple AJAX tutorial

Button tag inside anchor not working in IE

Rating 3.50 out of 5

HTML button tag might not work as expected when put inside anchor tags.

<a href=”http://www.expertsguide.info/”><button type=”button”>Click Me to go to Experts Guide</button></a>

I works well in Mozilla Firefox but in Internet Explorer (IE) nothing happens on clicking it.

Workaround:

Put some javascript event inside onclick event handler. Redirect (or open a new window) in javascript to required . . . → Read More: Button tag inside anchor not working in IE

How to access elements having some Class using Javascript?

Rating 3.67 out of 5

How to manipulate objects of all tags (suppose div) having some class name?

It can be achieved by first fetching all the div tags (or whichever you want) using function getElementsByTagName()
and then check their class name using another function className().  
It gives us more flexibility apart from getElementsByID() and getElementsByName().

<head>
<script type=”text/javascript”>
var allDivs = new Array();

// pass . . . → Read More: How to access elements having some Class using Javascript?

How to show or hide text using javascript?

Rating 3.00 out of 5

<head>
<script>
function showhide(id)
{
if (document.getElementById)
{
obj = document.getElementById(id);
if (obj.style.display == “none”) //check if already hidden, if yes make it appear
. . . → Read More: How to show or hide text using javascript?

Access Form objects in case of multiple forms

Rating 4.00 out of 5

How to access form objects in case of multiple forms, using JavaScript?

Assume, we have a form with the id “myform”, then form can be accessed by:

var oForm = document.getElementById(‘myform’);

This method can only be used only when the <form> tag has an id attribute.

Another way to do it without id attribute set . . . → Read More: Access Form objects in case of multiple forms