Hi All,
I have a page where is hotspot button in which i am trying to call an agent through javascript. what i code used is :-
location.href = “/dbname/agentName?OpenAgent”
if you have a look at the above code i hard-coded the dbName. which is bad programing. My question is how do i get the database name here through javascript. As you know this is page and i can’t add CGI or other fields here.
Please guide me if someone have answer.
Thanks with Regards,
Vikas K Sinha
9899817270
Subject: Fetch Database Name
Hi Vikas,
No fields no, but you can add pass-thru HTML and thus an input tag which can contain the dbname.
HTH
Joost
Subject: RE: Fetch Database Name
Thanks a lot friend,
Could you please provide how do i use this. as well as i also want to use current user in the lotus script agent which i called fro javascript
Waiting for your kind response.
Thansk with Regards,
Vikas
Subject: RE: Fetch Database Name
In pass-thru HTML somewhere on the page:
Where the computed text contains @WebDbName
Access in javascript:
document.forms[0].wdb.value
You can put any formula in a the computed field. You could also consider using a from instead of a page.
Joost
Subject: RE: Fetch Database Name
Thanks Joost,
Now its working file. Actually i am new developer of notes for web-based application so i am facing problem. i also want to get the current logged in user name in the agent which is called through the javascript. This agent is written in Lotus Script and called from the page’s hotspot button click event
Very-2 thanks for you response.
With Regards,
Vikas K Sinha
Subject: RE: Fetch Database Name
Vikas,
Read the Designer help. It contains tons of information that’s very usefull. NotesSession.EffectieveUsername for instance.
Joost
Subject: RE: Fetch Database Name
Thanks friend,
now it working. I have use CGI variables for curren logged in user like
thisdoc.Remote_User(0)
thanks
bye
Vikas K Sinha