View member feedback to this tip.
This tip describes a method that mimics dialog box functionality over the Web. Users click on a button and it pops up a window to choose a value. The user selects a value and hits submit. The selected value appears in the specified field and closes the pop-up window.
Code
1. Create a button next to your text field (Say Line)
<INPUT Type = button value = " v " onClick = "ChooseLINE(this.form)">
2. Create a JavaScript function in the same form
name ChooseLine
function ChooseLINE(form)
{
var dB = "<DBPath>";
window.open(dB + "/LINE?OpenForm&LINE="+ <Pass Any Parameter>,"Win", "scrollbars=yes,
resizable=yes,width=400,height=400")
}
3. Create a Notes Form named Line and create a field name CurrentLine for selection.
4. Write JavaScript in this form to transfer selected value to your original form
function ChangeLINE(form)
{
var curr = form.CurrentLINE.options[form.CurrentLINE.selectedIndex].text;
window.opener.document.forms[0].Line.value = "";
window.close()
}
window.opener.document gives you the original document.
Please contact me at pankaj_h@hotmail.com if you have any questions.
MEMBER FEEDBACK TO THIS TIP
This tip is very incomplete. It doesn't explain what should happen and created me more work than it saved. It was a good idea, so I just abandoned the tip here and went in search of someone else who took the time to explain it better.
-- Randal O.
Do you have comments of your own? Let us know.