hi
That's really helped me and
i tried the following and worked great!!!!!
Code:
try {
var tx1 = document.createElement( '<input name="usersno" MAXLENGTH = 3 onKeyUp = chgdate()>' );
}
catch( e ){
var tx1 = document.createElement("input");
tx1.setAttribute("name","usersno");
}
var tt = document.createTextNode("Enter No. of users:");
tx1.setAttribute("type","text");
tx1.setAttribute("maxlength","3");
tx1.setAttribute("size","12");
tx1.setAttribute("onKeyUp","chgdate()");
and the javascript function is called on the key up event also..
and i'm using same kind of my old code in another page where more 3 or 4 properties are to be set.. that is not working in IE because of the same old damn problem.
for example i have more properties to be set as
Code:
var tx1 = document.createElement("input");
tx1.setAttribute("name","rate"+localval);
tx1.setAttribute("type","text");
tx1.setAttribute("id",localval);
tx1.setAttribute("readonly",true);
tx1.setAttribute("class","rjust");
tx1.setAttribute("value","0.00");
tx1.setAttribute("size","8");
I think i can use the same method as creating the elements with the name , property etc...
but it's not seems to be good to add all properties as a single property for the createelement() function.
i wish to know is there any other method and any other property specific to IE ,especially in the case of events(such as adding a function call on specific event as onclick="callfunction()" ) and all others..
Please help me to code better and to make my script in all browsers
Bookmarks