Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Dialog Box using Javascript

Posted on 2001-09-05
13
Medium Priority
?
3,191 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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 200 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

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…
Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

719 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