B/S下运行代理不成功,求好心人帮帮忙!解决思路

B/S下运行代理不成功,求好心人帮帮忙!!
首先创建一个代理名字为ab:
代码如下:
Sub   Initialize
Dim   session   As   New   NotesSession
Dim   db   As   NotesDatabase
Dim   view   As   NotesView
Dim   doc   As   NotesDocument
Set   db=session.CurrentDatabase
Set   view=db.GetView( "fwd ")
Set   doc=view.getFirstDocument
If   doc.HasItem( "bh ")     Then
While   Not(doc   Is   Nothing)
Forall   bh   In   doc.GetItemValue( "bh ")
Messagebox   bh
End   Forall
Set   doc=view.GetNextDocument(doc)
Wend
End   If
End   Sub

代码的功能是如果fwd视图有bh这个域的值,则显示出来这个域中的内容

在表单中,我创建了一个按钮名字为查看,使用公式:@Command([ToolsRunMacro];   "ab ")

这个表单在notes下运行成功,当在ie谢浏览显示HTTP   500   内部错误

到底是怎么回事呢?

------解决方案--------------------
改成这样:
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
Set db=session.CurrentDatabase
Set view=db.GetView( "fwd ")
Set doc=view.getFirstDocument
While Not(doc Is Nothing)
If doc.HasItem( "bh ") Then
Forall v In doc.GetItemValue( "bh ")
Print | <script language= 'JavaScript '> |
Print |alert( "|+Cstr(v)+| ");|
Print | </script> |
End Forall
End If
Set doc=view.GetNextDocument(doc)
Wend
End Sub

------解决方案--------------------
Messagebox 只能C/S 结构中打印出来,B/S 下你可以到服务器上看

B/S 想打印的用alert

------解决方案--------------------
你把代理的属性修改一下.就会好的.
------解决方案--------------------
就是你的代理里:
sub
-> on error goto errorhandler
'接下去就是你的代码,譬如:
msgbox "your code is processing. "
-> exit sub
-> errorhandler:
-> print "Error: " + error + " line: " + cstr(erl)
end sub
我打尖头的地方就是要写的位置,你可以参照一下.