Using Javascript to Triger an Agent

Sounds simple enough… but i need a code in Javascript that would triger an Agent. I am using a hotspot, but the basic idea is to use the Agent to send an e-mail that has a copy of the form…

Any Input would be greatly apreciated…

Thnx

Subject: Using Javascript to Triger an Agent

The Value that i’m using for the hotspot is:http://domino/emfPROJ.nsf/SendMailNow?OpenAgent

Still giving me a “Cannot display this page” error on the web…

Subject: RE: Using Javascript to Triger an Agent

That doesn’t look like a valid URL to me. What is the DNS name?

Subject: RE: Using Javascript to Triger an Agent

Excuse me, but…

Is this a web application, or are you running it in the Notes client?

If it’s a web application, what’s the URL of the page that contains this JavaScript button? You could use the location.href function to find the current URL, take off everything following .nsf, and append “/agentname?OpenAgent”. Or if you know your database filepath, you could just leave off the server name, start your URL with /filepath…nsf/agentname?OpenAgent".

If it’s a Notes client application, the way to get the agent to run is not to use a URL. Instead, define a hidden macro code or LotusScript button that does what you want, and use the click() method to activate that control.

Subject: Using Javascript to Triger an Agent

Agents can be run through their URL’s. Just open a new window with the URL of the agent and it will execute.

Subject: RE: Using Javascript to Triger an Agent

For example i have an Agent by the name of “Sender”, what would be the url for this agent?

Subject: RE: Using Javascript to Triger an Agent

Seach the help for “Domino URL Commands.” Essentially, it’s this:

http://your server/path as necessary/databasename.nsf/agentname?OpenAgent

Subject: RE: Using Javascript to Triger an Agent

Tomas, it would be:

http://“myDBURL”/Sender?OpenAgent

Replace “myDBURL” with whatever URL corresponds to your database.

Subject: Using Javascript to Triger an Agent

OK, i have done all that u suggested so far but now when it tries to run the agent through the Hotspot on the web it say “This page cannot be displayed”

Is there somthing i don’t have turned on, or anything i’m missing…

thnx