Solved

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

Posted on 2002-05-06
11
239 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
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

805 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