File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes A function working in IE but not in Crome/Firefox Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "A function working in IE but not in Crome/Firefox" Watch "A function working in IE but not in Crome/Firefox" New topic
Author

A function working in IE but not in Crome/Firefox

sahithi mohan
Greenhorn

Joined: Feb 13, 2012
Posts: 9
<INPUT class="btn" onmouseover="this.className='btn btnhov'"
onmouseout="this.className='btn'" type=button value="Save" id=submit2 name=submit2
onClick="save()">



function save()
{

if(document.getElementById("selectedName.nameId").value == -1) {
alert("please select a name to save");
} else {
document.saveForm.action="save.action";
document.saveForm.submit();
}


}
Can some one help me, What are the changes i need to made to work with the Chrome or Firefox?
Wendy Gibbons
Bartender

Joined: Oct 21, 2008
Posts: 1107

I have no idea, but firebug is very useful, may help you workout stuff.
J. Kevin Robbins
Bartender

Joined: Dec 16, 2010
Posts: 919
    
  13

It's been my experience that it's usually the other way around. Works in Firefox, not IE. As Wendy said, you need Firebug to see what error message is showing up in the Javascript console.


"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." -- Ted Nelson
 
wood burning stoves
 
subject: A function working in IE but not in Crome/Firefox