I will admit I know little about java script. I copied this off a web site, then when it didn't work looked for another example, it set up slightly different but had the same error. Another puzzler is although it does not work when showing a message from a field, it works with a hardcoded string line.. So it is either due to the field or the info in the field.. But I see no extra "(" that need a closing ")"
The code not working that passes a field.
The translated code when looking at it in debug.
A similar WORKING example, but the message is not a field.
(PS.. I have figured out the reason for the error.. I can not use mapped paths.. I am just still forcing the error to fix the error handler)
The code not working that passes a field.
Code:
lbl.Text = "<script language='javascript'>" & Environment.NewLine _
& "window.alert(" & "'" & exp.Message & "'" & ")</script>"
Code:
<span><script language='javascript'>
window.alert('Could not find a part of the path 'G:\Reports\testrpt\2008-Oct\TearSheet10242008.pdf'.')</script></span>
Code:
lbl.Text = "<script language='javascript'>" & Environment.NewLine _
& "window.alert(" & "'" & "Error reading Acrobat PDF. (Did you change your version of Acrobat reader?) Call programmers to fix." & "'" & ")</script>"
(PS.. I have figured out the reason for the error.. I can not use mapped paths.. I am just still forcing the error to fix the error handler)