Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

A function working in IE but not in Crome/Firefox  RSS feed

 
sahithi mohan
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<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
Posts: 1111
Eclipse IDE Oracle VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have no idea, but firebug is very useful, may help you workout stuff.
 
J. Kevin Robbins
Bartender
Posts: 1801
28
Chrome Eclipse IDE Firefox Browser jQuery Linux MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!