We are using an alert inside of a .net app that is written in VB. I'm not sure if the problem is Javascript or VB related so I am posting to both forums.
All the previous code to this line works perfectly, but when you get to this line it sometimes works. Its one long line.
Response.Write("<HTML><script type=""text/vbscript"" language=""vbscript"" src=""SCRIPTS/OutlookExport.vbs""></script><body><SCRIPT FOR=window EVENT=onload LANGUAGE='JScript'>alert(" & Chr(34) & JScriptEncodeSpecialChars(sResponseMessage) & Chr(34) & ");" & sOutlookExportCode & ";try {parent.opener.parent.menuframe.makeChange(1); if(parent.opener.parent && parent.opener.parent.hiddenframe) {parent.opener.parent.mainframe.location.reload(false);}else {parent.opener.parent.location.reload(false);}}catch(Exception) {}window.parent.close();</script></body></HTML>")
This is the function that is called in the above line.
Function JScriptEncodeSpecialChars(ByVal strTemp As String) As String
On Error Resume Next
strTemp = Replace(strTemp, """", "'")
JScriptEncodeSpecialChars = strTemp
End Function
I'm not sure if I should post all of the code for OutlookExport.vbs so I won't for now. Basicially the functions in this file insert or update items in the outlook tasks list. We currently do not use outlook or outlook express so it is not configured on every machine, could this be why?
We realize this isn't much to go on, we are stuck too. Any suggestions are appreciated.
All the previous code to this line works perfectly, but when you get to this line it sometimes works. Its one long line.
Response.Write("<HTML><script type=""text/vbscript"" language=""vbscript"" src=""SCRIPTS/OutlookExport.vbs""></script><body><SCRIPT FOR=window EVENT=onload LANGUAGE='JScript'>alert(" & Chr(34) & JScriptEncodeSpecialChars(sResponseMessage) & Chr(34) & ");" & sOutlookExportCode & ";try {parent.opener.parent.menuframe.makeChange(1); if(parent.opener.parent && parent.opener.parent.hiddenframe) {parent.opener.parent.mainframe.location.reload(false);}else {parent.opener.parent.location.reload(false);}}catch(Exception) {}window.parent.close();</script></body></HTML>")
This is the function that is called in the above line.
Function JScriptEncodeSpecialChars(ByVal strTemp As String) As String
On Error Resume Next
strTemp = Replace(strTemp, """", "'")
JScriptEncodeSpecialChars = strTemp
End Function
I'm not sure if I should post all of the code for OutlookExport.vbs so I won't for now. Basicially the functions in this file insert or update items in the outlook tasks list. We currently do not use outlook or outlook express so it is not configured on every machine, could this be why?
We realize this isn't much to go on, we are stuck too. Any suggestions are appreciated.