RAW CODEfunction edInsertContent(myField, myValue) { //IE support if (document.selection) { myField.focus(); sel = document.selection.createRange(); sel.text = myValue; myField.focus(); } //MOZILLA/NETSCAPE support else if (myField.selectionStart || myField.selectionStart == '0') { var startPos = myField.selectionStart; var endPos = myField.selectionEnd; var scrollTop = myField.scrollTop; myField.value = myField.value.substring(0, startPos) + myValue + myField.value.substring(endPos, myField.value.length); myField.focus(); myField.selectionStart = startPos + myValue.length; myField.selectionEnd = startPos + myValue.length; myField.scrollTop = scrollTop; } else { myField.value += myValue; myField.focus(); } }
function edInsertContent(myField, myValue) { //IE support if (document.selection) { myField.focus(); sel = document.selection.createRange(); sel.text = myValue; myField.focus(); } //MOZILLA/NETSCAPE support else if (myField.selectionStart || myField.selectionStart == '0') { var startPos = myField.selectionStart; var endPos = myField.selectionEnd; var scrollTop = myField.scrollTop; myField.value = myField.value.substring(0, startPos) + myValue + myField.value.substring(endPos, myField.value.length); myField.focus(); myField.selectionStart = startPos + myValue.length; myField.selectionEnd = startPos + myValue.length; myField.scrollTop = scrollTop; } else { myField.value += myValue; myField.focus(); } }
Jonny Well as seen in my new mod, you need to edit the cookie paths to get them to work throughout the site, not just under the /forums directory. Having the ability to easily change the paths of the cookies can allow people to use the cookies throughout their site
Jonny Hmm, have you tried using double quotes around <img .. />? Edit - Doubt this'll work, but i think you need something like this: RAW CODEfunction edAddTag(button) { var img = '<img src="kjhfjk" />'; if (edButtons[button].tagEnd != '') { edOpenTags[edOpenTags.length] = button; document.getElementById(edButtons[button].id).value = img + document.getElementById(edButtons[button].id).value; } }
RAW CODEfunction edAddTag(button) { var img = '<img src="kjhfjk" />'; if (edButtons[button].tagEnd != '') { edOpenTags[edOpenTags.length] = button; document.getElementById(edButtons[button].id).value = img + document.getElementById(edButtons[button].id).value; } }
function edAddTag(button) { var img = '<img src="kjhfjk" />'; if (edButtons[button].tagEnd != '') { edOpenTags[edOpenTags.length] = button; document.getElementById(edButtons[button].id).value = img + document.getElementById(edButtons[button].id).value; } }
Jonny Can you not just change 'x' to something like: <img src="icon.png" /> ?