Hi,
The below code shows a simple button with some javascript executing on it.
This code is tested and works in IE6, NS6, Mozilla 0.99 but doesnt work in Opera.
So my question is, is Opera correctly and you not supposed to execute Javascript through an event attribute this way (as part of the standard), or am I correct and Opera 6 is at fault? I cant find anything on W3s site saying that I'm incorrect.
Any feedback would be appreciated.
Code:<html> <head> <title>Untitled</title> </head> <body> <input type="button" value="Click Me!" onclick="javascript:tmp=prompt('Enter Something','');if (tmp==null){alert('You clicked Cancel');}else{alert('You typed ' + tmp);}"> </body> </html>





Reply With Quote