Notes Ninjas Notes Ninjas
Lotus Notes hints, tips, error messages
WebQuerySave Error Dialog

Hint Short Cut: Add this to your code & documentation to help you find this page.
http://www.notesninjas.com/#WQSPopup or http://www.notesninjas.com/A555F9/nn.nsf/ByAlias/WQSPopup


Just debugging a domino web application and the developer has added code to display an error dialog pop up box when there is an error in the web query save agent.





Obviously this is a bit weird for a tueday afternoon when you are half asleep to see a server run bit of code pop up a dialog box in the web browser.

 

It is pretty obvious:

 

On error goto eh

'<do normal stuff in agent >

Print "[/" + web.path + "/0/" + doc.UniversalID + "]"
Exit Sub


eh:
Print |<script>alert('Error: | + Cstr(Error)  + | on line | + Cstr(Erl) + | (wqsRequest)')</script>|
End

 

Bascially the agent is just squirting out some javascript code with the alert code.

I prefer to do it as a normal message with a link "back" to the document, or to the last view so as not to scare the user too much:

 

Nb the [/url] is a trick for displaying a page at the end of a wqs. It is the WebQuerySave way of doing a $$Return.

NB: always best to prepend the names of  webquerysave agents with WQS to make them easy to find eg WQSrequest or WQOrequest

 

 Jump to:     Notes Tips
    Lotus Notes Index 
  Register for Tips
Previous Lotus Notes Tip 
    Next Lotus Notes Tip
Your company logo here?
Adam Foster
Free Cash Making Web Site
Free Revenue Earning Blog Site
 Free Revenue Earning Newsletter Site   
Free Search Pages Free Web stats
Free Contact Us page
Cheap .com domain names
 Need a website or 
   Lotus Notes
  problem solved?
Adam Foster
Beginning Java Web Services by Andre Tost, Henry Andre Bequet, Meeraj Kunnumpurath, Sean Rhody
Web services are no longer a nascent technology in the programming industry; every major software vendor is rolling out web services-related APIs and products. Today Java developers are successfully adopting web services as the latest technology in application development in order to enable...
See at: Amazon.co.uk | Amazon.com |