Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Javascript
executing javascript set with innerHTML in IE 7
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Thomas 'PointedEars' Lahn, post: 4974351"] You are welcome. Please also take heed of the recommendations about proper quoting. This is not a code factory; you should read postings more thoroughly: I used `_global' in the code and `global' in the explanation, but you should get the picture anyway. Sorry, I forgot to consider a peculiarity of MSHTML that requires you to set the `type' property of the object before you insert it in the DOM tree. Therefore, this should work (tested positive in IE 7.0.5730.11): var input = document.createElement("input"); if (input) { input.type = "button"; element.appendChild(input); input.value = "test me"; } The additional type-converting test here is useful in any case. Don't forget to add runtime feature tests at least for all method calls. PointedEars [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Javascript
executing javascript set with innerHTML in IE 7
Top