Solved

Dialog Box using Javascript

Posted on 2001-09-05
13
3,179 Views
Last Modified: 2013-12-18
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?
0
Comment
Question by:snocross
[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
  • 4
  • 3
  • 3
  • +2
13 Comments
 
LVL 1

Expert Comment

by:pcorreya
ID: 6459372
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 ?
0
 
LVL 8

Expert Comment

by:Jean Marie Geeraerts
ID: 6459677
Sounds interesting...
0
 
LVL 13

Expert Comment

by:CRAK
ID: 6459832
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!
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!

 
LVL 10

Expert Comment

by:zvonko
ID: 6460581
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?

Regards,
zvonko
0
 
LVL 1

Expert Comment

by:pcorreya
ID: 6462576
CRAK

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.


Regards
Patrick
0
 
LVL 8

Expert Comment

by:Jean Marie Geeraerts
ID: 6463151
pcorreya,
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).
0
 
LVL 13

Expert Comment

by:CRAK
ID: 6463221
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.
0
 
LVL 13

Accepted Solution

by:
CRAK earned 50 total points
ID: 6463381
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.

FillOutForm:

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>
return(baseUrl)
}
</Script>


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");
myPopUp.focus()



popUpForm:

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
opener.document.forms[0].AnyField.value=txt
window.close()



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.
0
 
LVL 1

Expert Comment

by:pcorreya
ID: 6463689
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.

Regards
Patrick
0
 
LVL 8

Expert Comment

by:Jean Marie Geeraerts
ID: 6463774
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 !!
0
 
LVL 5

Author Comment

by:snocross
ID: 6491659
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.
0
 
LVL 13

Expert Comment

by:CRAK
ID: 6492799
Thanks!
Just make sure you use lowercase "window": JS is case sensitive!
Unless you use a variable Window=window of course....
0
 
LVL 5

Author Comment

by:snocross
ID: 6548601
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...

Thanks.
0

Featured Post

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

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

This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

626 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