var inputs = document.getElementsByTagName('input');
for (var i = 0; i < inputs.length; i++) {
var id =inputs.getAttribute('id')
if(id.indexOf("txtLgnEmailID")!=-1)
{
oDDL = inputs.getAttribute('id')
svalue=document.getElementById(oDDL).value;
if (document.getElementById(oDDL).value=="- User EmailID -")
{
document.getElementById(oDDL).value=""
}
}


}

It was not working in Firfox.. Please help to soive it..

You are missing some semicolons.

While IE lets you get away with not putting the required semicolons between statements when you are on the top level. Firefox will not.

You need a semicolon after:
- the second var statement
- The oDDL = statement
- the document. statement
- in this case, all three closing braces

You need to put your code in code tags in your post.

And you can't do anything secure in JavaScript.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.