sdustinh
02-13-2008, 08:36 PM
Alright, I've got this script I'm working on. When you select one of the options from the pull down box, it will replace the select with a text input field. Here is the section of code I'm using for that:
var customMP = document.getElementById("part_mp");
var newCustomMP = document.createElement("input");
newCustomMP.setAttribute("id", "part_mp");
newCustomMP.setAttribute("size", "12");
newCustomMP.setAttribute("name", "mountpoint");
newCustomMP.setAttribute("type", "text");
newCustomMP.setAttribute("value", setMP);
thePartPopup.replaceChild(newCustomMP, customMP);
newCustomMP.focus();
This works fine in Safari and FF, but in IE when the option is selected it doesn't replace it with the text input. Even more, it doesn't even spit out and error or reason why it doesn't switch them out. I'm hoping someone on here knows why. I've had problems with IE and setAttribute() but it's always spit out an error. Thanks for the help.
var customMP = document.getElementById("part_mp");
var newCustomMP = document.createElement("input");
newCustomMP.setAttribute("id", "part_mp");
newCustomMP.setAttribute("size", "12");
newCustomMP.setAttribute("name", "mountpoint");
newCustomMP.setAttribute("type", "text");
newCustomMP.setAttribute("value", setMP);
thePartPopup.replaceChild(newCustomMP, customMP);
newCustomMP.focus();
This works fine in Safari and FF, but in IE when the option is selected it doesn't replace it with the text input. Even more, it doesn't even spit out and error or reason why it doesn't switch them out. I'm hoping someone on here knows why. I've had problems with IE and setAttribute() but it's always spit out an error. Thanks for the help.