Solved

Unable to See hot spot button in the browser

Posted on 2001-06-24
12
221 Views
Last Modified: 2013-12-18
hai experts,
  I am new to Lotus Domino.I started programming in Designer.I created one hotspot button and wrote code in lotus Script like

Dim i As Integer
     i=10
     Print i

but I am Unable to See the Hotspot button in the browser.

what may be the problem.


0
Comment
Question by:NASEEMA
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 4
12 Comments
 
LVL 8

Expert Comment

by:Jean Marie Geeraerts
ID: 6223369
LotusScript is not supported on the web, that is why you can't see the button.
If you want to run LotusScript from the web, put your code in an agent. Set this agent to "Run Once (@commands may be used)" and "Manually run agent from agent list". This way you can only start the agent from the agent list in designer or through an action button.
Have the following formula in your action hot-spot to call the agent and run your code :
@command([ToolsRunMacro]; "The name of your agent")

Regards,
JM

I answered your question twice, does this mean I get double points too ? I guess I'm the only expert interested in helping somebody with a 2 point question anyway ;-)
0
 
LVL 13

Expert Comment

by:CRAK
ID: 6223540
For the web is best not to use lotusscript for front-end purposes at all: triggering executing an agent would require the server to take action.
If lots of people trigger that agent, that single server will have quite a lot on its mind....

Javascript would be the preferred alternative here:

i = 10
alert(i)

Create a 2nd hotspon with this code and hide the javascript hotspot from notesclients and the lotusscript hotspot from browsers....


You can even read/write notesfields form javascript:

fld = window.forms[0].myField
fld.value = fld.value + "added text"

0
 
LVL 8

Expert Comment

by:Jean Marie Geeraerts
ID: 6223558
Absolutely correct, CRAK.
Best alternative for web is JavaScript, because it's a lot faster. (and easier on your domino server).
For example, form validation is mostly done through JavaScript, because it will give an immediate feedback to the user, without having to call upon the server.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:NASEEMA
ID: 6223585
hello,
  If  I dont want to write javascript i have to create agent and call agent in the hotspot button.Why most of the commands wont work on the web in Lotus.
        ok i will do it.
       
0
 
LVL 8

Expert Comment

by:Jean Marie Geeraerts
ID: 6223599
Don't blame Lotus. It's the web browser that doesn't understand LotusScript, to compile LotusScript to JavaScript when translating the pages would probably take too long, that's why you need to write JavaScript (which most recent browsers can interpret) or have the server perform the action through an agent.
Maybe a hint to refer to the current document in the agent, use the following script :

  dim session as new notessession
  dim currDoc as notesdocument
  set currDoc=session.documentcontext

0
 

Author Comment

by:NASEEMA
ID: 6223620
hello,
  As u said i created i created the agent manually from the agent and run once once @commands used.now i can see the button on the browser.good.
 After that on the hotspot button i selected run: formula and
@Command([ToolsRunMacro];"forloop")
 the agent name is forloop.

so when i opened the form in the browser i see the button but the problem is when i click on the button i am getting the page cannot be displayed.



0
 
LVL 8

Expert Comment

by:Jean Marie Geeraerts
ID: 6223634
What error do you get on the page ?
Do you get an internal server error or a page not found error ? You can find an error description at the bottom of the error page that is displayed.
If it is the first, there's an error in your script code, (in this case maybe post your script code here if you need a hint as to what may be wrong).
If it's the latter make sure you typed in the correct name for your agent.
0
 

Author Comment

by:NASEEMA
ID: 6223681
hello jerrith,
  i am getting the page cannot be displayed.
May be i am wrong in the agent
The  agent code is like this
Name :forloop
when should this agent run: manually from agent list
which documents it should act on: run once @commands used


down(code window)
run : lotuscript
initialize:
Dim i As Integer
     i=10
     Print i

then on the form

hotspot button:
click event :
 run:  formula

@Command([ToolsRunMacro];"ForLoop")

if u answer this u can get 4 points by mistake i refreshed the browser.

waiting for reply.

0
 
LVL 8

Accepted Solution

by:
Jean Marie Geeraerts earned 2 total points
ID: 6223704
Is your agent a shared agent ? You have to check the checkmark next to Shared Agent below the agent's name when you create the agent.
I've tried exactly the same code on a little test form and I didn't have any problems running it when using a shared agent, however I tried with a not shared agent and this gave me an "Internal server error", so maybe that's what's wrong.
If you didn't check the checkmark when you created the agent, you have to recreate the agent, because you cannot change this afterwards.
0
 
LVL 8

Expert Comment

by:Jean Marie Geeraerts
ID: 6223710
One more thing : if it still doesn't work with a shared agent, check to see whether you are authorized to run Restricted/Unrestricted agents on the server. (Your name or the name of a group you belong to has to be in the according section in the server document in the Domino Directory).
0
 

Author Comment

by:NASEEMA
ID: 6223731
Thanks jerrith for ur response.Now my mistake i refreshed the browser may be i dont know whether u can get either two or four points.


Thanks once again
0
 
LVL 8

Expert Comment

by:Jean Marie Geeraerts
ID: 6223752
Just accept my comment in the other question as the correct answer as well.
Glad to have been of help ;)
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question