Solved

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

Posted on 2002-05-06
11
252 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
[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
  • 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
[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

 

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
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…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

617 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