Solved

Unable to See hot spot button in the browser

Posted on 2001-06-24
12
213 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
  • 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
 

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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

705 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now