Click here to Skip to main content
15,896,473 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I'm using Gecko Browser and I can't call any Javascript methods.
All of this works when using IE Browser and In firefox.

This Works:

HTML
<input type="button" value="Test" onClick="this.value = 'TEST'"> </input>




This Doesn't Work:
HTML
<script type="type/javascript">

function Test(btn){

btn.value = "TEST";

}

</script>


<input type="button" value="Test" onClick="Test(this);"</input>
Posted
Comments
krumia 8-Jun-12 6:58am    
Did you check the browsers JavaScript settings? Is it enabled?
ZaiDz 8-Jun-12 14:30pm    
How do I do that?

1 solution

hi,

you have made error in code change this
JavaScript
<script type="type/javascript">

to
JavaScript
<script type="text/javascript">

instead of text you had written type
 
Share this answer
 
v2
Comments
bbirajdar 8-Jun-12 9:43am    
Nice catch ..+5
ZaiDz 8-Jun-12 14:31pm    
No, That didn't work;

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900