Dialog Box using Javascript

I have a web app and I would like to create a dialog box where the user can pick from a list.  Is it possible to do this with Javascript?  If not, do you have any other ideas?
Who is Participating?
Sorry Sno,
This has not been helping you a whole lot....

An example (there are lots of other ways too, like executing an agent printing the HTML code to the pop-up...):

I created 2 forms: FillOutForm and popUpForm.


On the form itself (because of the computed text) I've put following code in pass-through HTML:

<Script Language="Javascript">
function getBaseURL()
baseUrl = <Computed Value>

The computed text comtains following formula:

"\"/" + @ReplaceSubstring(@Subset(@DbName; -1); "\\"; "/") + "\""

I also added a text field "AnyField":
onFocus: this.blur()
(You'll be able to see the field but can not enter any data in it now!)

Near the field I've added a small button to trigger the popUp. In javascript onClick:
newUrl = getBaseURL() + "/popUpForm" // you could pass a default value to the popup here
myPopUp = window.open(newUrl, "popUpName", "height=300,width=450,screenX=200,screenY=200,direcories=no,hotkeys=no,menubar=no,resizable=yes, location=no,scrollbars=yes,status=no,titlebar=no,dependent=yes");


A field: SaveOptions = "0" (not required; just to be safe or to make things clear to other developers: documents are not stored!)

Another field (dialog list), called "myField". Options: A, B, C, D, E or whatever you like.

A button "ok", in JS: onClick:
fld = document.forms[0].myField
n = fld.selectedIndex
txt = fld.options[n].text // you may need value instead of text depending on alias

Beware of JS being case sensitive. The fieldnames are perhaps not so well chosen!

If you preview FillOutForm in the browser, you should be able see it in action.
Yes, I have done that, I have developed dialog boxes do perform name searches from the name & address book and also a dialog box that displays a view with check boxes where a user can select an item and submit the dialog box which then runs and agent and refreshes the opener form. Can you give me further details on what exactly you are trying to do ?
Jean Marie GeeraertsApplication EngineerCommented:
Sounds interesting...
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

pcorreya, though I've build JS-dialog boxes more often too, one to select multiple names from the NAB still puzzles me, due to the 64k limit of a @DbColumn.
If you've already solved that, and don't mind to send it by mail, I am certainly willing to add some points to your score.... ;-))

By the way.... working for Telstra in Australia... do you know anyone there named "Schols"? I know it's a large company, but I feel there is a possibility!
Hello Sno,

best example for that you like to have in web is: mail50.ntf
Look into it for the form: (wAddress)

Espacialy look (if you like NAB lookups) for undocumented commands like this:
@DbCommand("Domino"; "LoadAddressListByName"; NABs; "EntryList"; "20"; FindText);

Or do you think about something else?


There is a Peter & Rudi Schols in our exchange address book. Do you know any of them ?

I have used a very unconventional method to create the web name search dialog for the web. I haven't used @dbcolumn. I use a webquerysave agent which fetches the names from the NAB and returns it back to the dialog box.

Jean Marie GeeraertsApplication EngineerCommented:
Do we need to post an extra question to get the code for that are are you willing to post it in this question ?
(I'd be glad to post a question, I've got plenty of points to spare).
Rudi is my brother in law... I assume you haven't met him!?
If I remember well, recently left Telstra.

Zvonko, very good suggestion! Should have thought of it myself! Will look at it!
How come you're not back in top 15 yet? Both your Lotus Notes score and your totalscore exceed Antonysinghs.
Hi jerrith

I am happy to send you the code, I know you guys will help me when I need something. What is your email address, I shall send you a .nsf with all the design elements.
Post another question if you feel generous with giving me the extra points. I have just started off as an expert, so this will help.

Jean Marie GeeraertsApplication EngineerCommented:
The solution to this problem is well worth 300 points to me.
Here's a link to the question I created for you : http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=lotusnotes&qid=20179881

Thanks in advance !!
snocrossAuthor Commented:
Thanks!  Window.open is what I ended up using.  I actually used a database I downloaded from note.net but your code was similar so you get the points.
Just make sure you use lowercase "window": JS is case sensitive!
Unless you use a variable Window=window of course....
snocrossAuthor Commented:
Crak, how can I close the previous window when chosing a keyword?  The very first window to be specific?  I will be glad to post more points to you for this...

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.