Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3208
  • Last Modified:

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?
0
snocross
Asked:
snocross
  • 4
  • 3
  • 3
  • +2
1 Solution
 
pcorreyaCommented:
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
 
Jean Marie GeeraertsCommented:
Sounds interesting...
0
 
CRAKCommented:
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
zvonkoCommented:
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
 
pcorreyaCommented:
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
 
Jean Marie GeeraertsCommented:
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
 
CRAKCommented:
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
 
CRAKCommented:
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
 
pcorreyaCommented:
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
 
Jean Marie GeeraertsCommented:
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
 
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.
0
 
CRAKCommented:
Thanks!
Just make sure you use lowercase "window": JS is case sensitive!
Unless you use a variable Window=window of course....
0
 
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...

Thanks.
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 4
  • 3
  • 3
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now