Solved

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

Posted on 2002-05-06
11
233 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
Comment Utility
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
Comment Utility
you know me......
...please provise some "cut & past" enabled code.

thanks
hreinart
0
 
LVL 24

Expert Comment

by:HemanthaKumar
Comment Utility
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
 

Author Comment

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

Author Comment

by:hreinart
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 24

Expert Comment

by:HemanthaKumar
Comment Utility
What is that you want then ?
0
 
LVL 24

Expert Comment

by:HemanthaKumar
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks for the A :)
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

763 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now