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
Solved

nedd popup box with buttons and possibility to choose from the buttons

Posted on 2002-05-06
11
243 Views
Last Modified: 2013-12-18
i'm using a frameset and outlines.
one outline starts a new frameset.

now i want not the frameset started immediately.
instaed of this, i'd like to get a popup box (or something similar) asking: do you accept the agreement yes/no).

in case yes, the frameset should open, like today.
in case no, a predefined page, form ... should be opened.
0
Comment
Question by:hreinart
  • 5
  • 4
  • 2
11 Comments
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 6991171
There is a javascipt 'Prompt' function which can act like that.

Or, Use window.open command to open th url for the agreement document and then provide two buttons as accept or cancel and pass those values to the parent document.

~Hemanth
0
 

Author Comment

by:hreinart
ID: 6991183
you know me......
...please provise some "cut & past" enabled code.

thanks
hreinart
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 6991206
Ok. Here you go

This will open a form called Test.( and this will be in host window)
window.open("Test?Openform");

This will go into the Accept button of the opened window.
window.close();
window.opener.location.href = "Frameset Name"

0
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 

Author Comment

by:hreinart
ID: 6991255
...and this can be put in the outline entry ?
i didn't get your idea , yet.
0
 

Author Comment

by:hreinart
ID: 6991314
hi,

i just created a page including 2 button (pasted from a graphic program) and added 2 hotspots with the equivalent urls. it's not really what i wanted, but it works.

0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 6991332
What is that you want then ?
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 6991344
For the outline entry class, use url content and the formula as

"javascript:window.open(\'Test?Openform\'); history.go(-1)"

0
 

Author Comment

by:hreinart
ID: 6992071
hi,

my intention was to get a popup box/window where i can place a little text "do you agree?" and 2 buttons yes/no.
depending on the selection, 2 different framsets should be loaded/displayed.

maybe i'm wrong, buut i don't see in your suggestion any kind of button/popup.

in case we have a misunderstanding here, i suggest to delete the question due to my selfmade page (even if it's not that good looking like i wanted it).

if i could past a graphic here, i'd paste thew kind of popup i think of.
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 6992303
Then use , function prompt

window.open opens a html page or any url or may be a form for that fact. And the opened page would be a agreement, with two buttons accept and cancel.

Accept will have the code to close the agreement and open the desired frameset.

Cancel will simply close the agreement.

If you are looking for some kind of msgbox , with yes/no option then use javascript function, confirm( message)

is it clear now !!!
0
 
LVL 8

Accepted Solution

by:
Jean Marie Geeraerts earned 50 total points
ID: 6993060
If it's a copy/paste solution you're looking for Harald:

Here's what to do:
First, I suppose you have a page, where you embedded the outline, right ?
In this page, in the JS Header put the following function:

function agree()
    {
    // Get the path to the database root to create a URL reference
    var pathname = window.location.pathname;
    filename = pathname.substring(0,(pathnmae.lastIndexOf('.nsf')+4));
    // Ask for confirmation. The \n inserts a new line in the text
    var yesNo=window.confirm("Do you agree?\nClik OK to continue, Cancel to abort');
    if (yesNo==true)
        // User confirmed
        parent.location.href=filename+"/Frameset1?OpenFrameSet"
    else
        // User disagrees
        parent.location.href=filename+"/Frameset2?OpenFrameSet";
    }

This function will check the user's answer and open Frameset1 in the current window if the user agrees and open Frameset2 in the current window if the user disagrees.
The parent.location.href= refers to the current window, being the parent of the frame where your outline is located in.

Now in your outline entry all you need to do is to use the following :
Type : URL
Value : Computed, click on the @ to enter the formula :
    "JavaScript:agree()"

Now when you click your outline entry, a simple confirmation box will be displayed and depending on the selection of the user, the correct frameset will be opened.

Regards,
JM
0
 
LVL 8

Expert Comment

by:Jean Marie Geeraerts
ID: 10820953
Thanks for the A :)
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

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…
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

860 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