Solved

Dialog Box using Javascript

Posted on 2001-09-05
13
3,166 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
Industry Leaders: 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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

734 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