7079
10-11-2006, 07:50 PM
Hi,
I have this function that I am using in one of my apps. I need helping in making the function usable for multiple drop downs on the same page. I could copy and paste the function and modify the names so that I have a unique function for each select menu, but I know there is a better way.
Here is the function:
function insertHTML() {
var thisSelect = document.getElementById("delims");
thisval = thisSelect.options[thisSelect.selectedIndex].value;
if(thisval.length > 1){
tinyMCE.execInstanceCommand("mce_editor_0","mceInsertContent",false,thisval);
}
}
Any suggestions or help will be greatly appreciated!
Thanks,
7079
I have this function that I am using in one of my apps. I need helping in making the function usable for multiple drop downs on the same page. I could copy and paste the function and modify the names so that I have a unique function for each select menu, but I know there is a better way.
Here is the function:
function insertHTML() {
var thisSelect = document.getElementById("delims");
thisval = thisSelect.options[thisSelect.selectedIndex].value;
if(thisval.length > 1){
tinyMCE.execInstanceCommand("mce_editor_0","mceInsertContent",false,thisval);
}
}
Any suggestions or help will be greatly appreciated!
Thanks,
7079