|
Hi all
i have this java script that with Firefox works fine but with IE9 don't work; any idea how to solve the problem ? Thanks in advance.
here the javascript
var element = e.srcElement || e.target;
if(element != null){
if(element.tagName == "INPUT") {
//alert("Before: " + element.getAttribute("type"));
element.setAttribute("type", "password");
//alert("After: " + element.getAttribute("type"));
}
}
|
|
|
|
|
hi,
I have reviewed yr code , can u check method compatibility with i9.
may be some problem in this code ..."var element = e.srcElement || e.target;"
|
|
|
|
|
you press F12 in IE9, or go to tools I think, and select developer for F12, and you can run it again, and it will flag the error for you.
What is e?, I don't see a reference to that object.
|
|
|
|
|
create an INPUT
IE 8
createElement('') // don't forget < and >
Opera, Mozilla ....
createElement('INPUT')
...
pointerOfInput.type=....
example onkey handler
function som(e) // e placeholder for event
{
var KeyCodeValue;
if( (e==null) || (e==undefined)){e=window.event;}
if('which' in e){KeyCodeValue=e.which;}
else{KeyCodeValue=e.keyCode;}
....
}
example mouseevent handler
function som(e) // e placeholder for event
{
if( (e==null) || (e==undefined)){e=window.event;}
var LeftPos=e.clientX;
var TopPos=e.clientY;
...
}
|
|
|
|