I'm guessing that my attempt here isn't correct since I've never done Javascript before. Can someone help me out?
Code:<SCRIPT LANGUAGE = "VBScript"> Dim oWindow,oDocument,oSelect,oSelectRange Set oWindow = window.external.menuArguments Set oSource = oWindow.event.srcElement Set oDocument = oWindow.document Set oSelect = oDocument.selection Set oSelectRange = oSelect.createRange() If oSource.tagName = "TEXTAREA" Then oSelectRange.text = "[b]" & oSelectRange.text & "[/b]" End If </SCRIPT>Code:<SCRIPT LANGUAGE = "javascript">; var oWindow,oDocument,oSelect,oSelectRange oWindow = window.external.menuArguments oSource = oWindow.event.srcElement oDocument = oWindow.document oSelect = oDocument.selection oSelectRange = oSelect.createRange(); if(oSource.tagName == "TEXTAREA"){ oSelectRange.text = "[b]" + oSelectRange.text + "[/b]"; } </SCRIPT>




Reply With Quote