*
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
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: 1106

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

Joined: Dec 16, 2010
Posts: 632
    
    7

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.


"There is no reason for any individual to have a computer in his home" ~ Ken Olson, Co-founder of DEC, 1977
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: A function working in IE but not in Crome/Firefox
 
Similar Threads
[struts 2] multiple buttons
Identifying the submit button
recognizing different buttons pressed in html form in servlet
Value from select element is null in request
How to getParameter value