child page remain, main to close

T

tom robertson

I have a main page that pops up a child page. I would
like the main page to close once the child page is open.
Using this.close(); at the moment but
a) this propmpts the user with a confirmation window
b) this operation closes both the main and the child
windows

is ther some code, or a function in frontpage that will
enable me to have the main page closed once the child has
popped up?

thanks,

Tom
 
S

Steve Easton

Add this to the opening body tag for the page that you want to close:

onblur="parent.close; 'return.false;'"

So that the body tag looks like this:

<body onblur="parent.close; 'return.false;'">

Note that there is both a ' and a" at the end: '"


--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer
 
J

Jens Peter Karlsen[FP-MVP]

Parent.close() in the child window and it will give the user a prompt.

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.

-----Original Message-----
From: tom robertson [mailto:[email protected]]
Posted At: 14. juli 2004 14:00
Posted To: microsoft.public.frontpage.client
Conversation: child page remain, main to close
Subject: child page remain, main to close


I have a main page that pops up a child page. I would like the main page
to close once the child page is open.
Using this.close(); at the moment but
a) this propmpts the user with a confirmation window
b) this operation closes both the main and the child windows

is ther some code, or a function in frontpage that will enable me to
have the main page closed once the child has popped up?

thanks,

Tom
 
T

tom robertson

Thanks for this. Did as instructed but parent page failed
to close. Parent page html is:

<html>

<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Click here</title>
<script>

//Modeless window script- By DynamicDrive.com
//for full source code and terms of use
//visit http://www.dynamicdrive.com

function modelesswin(url,mwidth,mheight){
if (document.all&&window.print) //if ie5
eval('window.showModelessDialog
(url,"","help:0;resizable:1;dialogWidth:'+mwidth+'px;dialo
gHeight:'+mheight+'px")')
else
eval('window.open
(url,"file:///Z:/Form/Test/partnersearch.htm","width='+mwi
dth+'px,height='+mheight+'px,resizable=1,scrollbars=1")')
}

modelesswin
("file:///Z:/Form/Test/partnersearch.htm",800,800)

</script>

</head>

<body>

</body>

</html>


partnersearch.htm has your script in the body tag.

Tom
 
T

tom robertson

Hi sorry for my mistake. I have now put your script into
the body tag of the parent file (the one i want to
close) - see below. However it still does not want to
close.

Thanks. T

<html>

<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Click here</title>
<script>

//Modeless window script- By DynamicDrive.com
//for full source code and terms of use
//visit http://www.dynamicdrive.com

function modelesswin(url,mwidth,mheight){
if (document.all&&window.print) //if ie5
eval('window.showModelessDialog
(url,"","help:0;resizable:1;dialogWidth:'+mwidth+'px;dialo
gHeight:'+mheight+'px")')
else
eval('window.open
(url,"file:///Z:/Form/Test/partnersearch.htm","width='+mwi
dth+'px,height='+mheight+'px,resizable=1,scrollbars=1")')
}

modelesswin
("file:///Z:/Form/Test/partnersearch.htm",800,800)

</script>

</head>

<body onblur="parent.close; 'return.false;'">


</body>
 
S

Steve Easton

Don't know if this has anything to do with it, but the following links are incorrect:
(url,"file:///Z:/Form/Test/partnersearch.htm","width='+mwi
and
("file:///Z:/Form/Test/partnersearch.htm",800,800)



--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer
 
J

Jens Peter Karlsen[FP-MVP]

It needs to go in the child page. The initial page doesn't have parents.

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.

-----Original Message-----
From: tom robertson [mailto:[email protected]]
Posted At: 14. juli 2004 14:44
Posted To: microsoft.public.frontpage.client
Conversation: child page remain, main to close
Subject: Re: child page remain, main to close


Hi sorry for my mistake. I have now put your script into the body tag of
the parent file (the one i want to
close) - see below. However it still does not want to close.

Thanks. T

<html>

<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252"> <meta name="GENERATOR" content="Microsoft
FrontPage 4.0"> <meta name="ProgId" content="FrontPage.Editor.Document">
<title>Click here</title>
<script>

//Modeless window script- By DynamicDrive.com //for full source code and
terms of use //visit http://www.dynamicdrive.com

function modelesswin(url,mwidth,mheight){ if
(document.all&&window.print) //if ie5 eval('window.showModelessDialog
(url,"","help:0;resizable:1;dialogWidth:'+mwidth+'px;dialo
gHeight:'+mheight+'px")')
else
eval('window.open
(url,"file:///Z:/Form/Test/partnersearch.htm","width='+mwi
dth+'px,height='+mheight+'px,resizable=1,scrollbars=1")')
}

modelesswin
("file:///Z:/Form/Test/partnersearch.htm",800,800)

</script>

</head>

<body onblur="parent.close; 'return.false;'">


</body>
 
S

Steve Easton

back to the drawing board, I was wrong :-(


--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer
 
T

tom robertson

Incorrect?

they came from a script I am using to produce a modeless
window and point to a file on my local drive. The child
page is a modeless window, I wonder if this is the
problem?

regards,

t
 
S

Steve Easton

Ok.

If the web is going to be published to a server the links won't work.
If it is going to be run on an intranet they "probably" will work.

--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer
 
T

tom robertson

yeah it's for a form downloadable to a user's computer

seems to work ok.

now the script sems to close both windows on startup!!

T
 
Top