skbhagat35
asked on
Text deletes
I have this asp classic code to fix, the problem is when i m using IE10 and then type some txt in the message box to send mail then as soon as i select for <b>,<i> etc, the text gets deleted now this function is ok with IE 9 I don't know why its acting weird with IE10.
Any suggestion,
Any suggestion,
Post your code.
ASKER
This is the code for above question
<script language="JavaScript">
notext = true;
function displaymsg1(){
if (notext == true)
{
alert("You must click in the text area you wish to view first.")
return;
}
// replace ExStream tags with HTML tags
var input = currentitem.value.replace( /<bi>/gi, "<b><i>")
var input2 = input.replace(/<bu>/gi, "<b><u>")
var input3 = input2.replace(/<iu>/gi, "<u><i>")
var input4 = input3.replace(/<biu>/gi, "<b><i><u>")
var input5 = input4.replace(/<\/bi>/gi, "</i></b>")
var input6 = input5.replace(/<\/bu>/gi, "</u></b>")
var input7 = input6.replace(/<\/iu>/gi, "</u></i>")
var input8 = input7.replace(/<\/biu>/gi , "</u></i></b>")
var input9 = input8.replace(/\r/gi, "<br>")
// Set up Page Colors & Table
var s1 = "<TITLE>View Your Text</TITLE><BODY BGCOLOR='ffffff'><BASEFONT SIZE=2 FACE=arial>"
var s2 = "<a href='javascript:self.clos e();'>Clos e</a><BR>< BR>"
popup = window.open("","GlobalHelp ","height= 400,width= 500,resiza ble=yes, scrollbars=yes,dependent=y es,top=150 ,left=100" )
popup.document.write(s1+s2 +input9)
popup.document.close()
}
function MSelect(strType,strApp,Str Mode,MsgSe l)
{
var strMsgID = document.form1.MType.value ;
//alert(strMsgID)
document.form1.action = "MessageDetail.asp?type="+ strType+"& apply="+st rApp+"&mod e="+StrMod e+"&MsgID= "+strMsgID +"&MType=" +strMsgID+ "&Mflag="+ "Yes"
document.form1.submit()
//alert(strType + strApp + StrMode)
}
</script>
Thanks,
<script language="JavaScript">
notext = true;
function displaymsg1(){
if (notext == true)
{
alert("You must click in the text area you wish to view first.")
return;
}
// replace ExStream tags with HTML tags
var input = currentitem.value.replace(
var input2 = input.replace(/<bu>/gi, "<b><u>")
var input3 = input2.replace(/<iu>/gi, "<u><i>")
var input4 = input3.replace(/<biu>/gi, "<b><i><u>")
var input5 = input4.replace(/<\/bi>/gi,
var input6 = input5.replace(/<\/bu>/gi,
var input7 = input6.replace(/<\/iu>/gi,
var input8 = input7.replace(/<\/biu>/gi
var input9 = input8.replace(/\r/gi, "<br>")
// Set up Page Colors & Table
var s1 = "<TITLE>View Your Text</TITLE><BODY BGCOLOR='ffffff'><BASEFONT
var s2 = "<a href='javascript:self.clos
popup = window.open("","GlobalHelp
popup.document.write(s1+s2
popup.document.close()
}
function MSelect(strType,strApp,Str
{
var strMsgID = document.form1.MType.value
//alert(strMsgID)
document.form1.action = "MessageDetail.asp?type="+
document.form1.submit()
//alert(strType + strApp + StrMode)
}
</script>
Thanks,
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.