navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
FrontPage Alternative
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

Add Close window Link

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Community >> OutFront Discoveries >> Add Close window Link
Page: [1]
 
hhammash

 

Posts: 1064
Joined: 8/19/2002
Status: offline

 
Add Close window Link - 9/29/2002 17:46:29   
Hi all,

Add a close This Window link.

Insert this code wherever you want to see it in your page.

1- In the normal view in Frontpage Type " Close"
2- Highlight " Close"
3- Switch to HTML View
4- You will see the word " Close" highlited
5- Delete it and insert the code in it' s place

The Code

<a href=" javascript:window.close()" ><font color=" #800000" >Close
Window</font></a>


Regards
Hisham
Charles W Davis

 

Posts: 1725
Joined: 3/7/2002
From: Henderson Nevada USA
Status: offline

 
RE: Add Close window Link - 9/30/2002 10:23:07   
Hisham,

I tried your Close on a trial basis.

  • With IE6, a message pops up saying something like the browser wants to close the window, do you want to continue.
  • With Opera 6, the window closes alright, but so does the address bar.
  • It works consistently in both NN 4.76 and NN 7.


I have found the following to work across the board.

(Instead of the five steps)
In the normal view, place your insert pointer on the page where you want the link, choose Adanced from the Insert menu and choose HTML. Paste the code into the popup dialog box, choose OK.

<form> 
<input type=" button" value=" Close Window" onClick=" window.close();" > 
</form>


_____________________________

Enjoy! It' s your endeavor!
http://www.anthemwebs.com

(in reply to hhammash)
hhammash

 

Posts: 1064
Joined: 8/19/2002
Status: offline

 
RE: Add Close window Link - 10/23/2002 13:44:44   
Hi,

Thank you for your input and ideas.

Thanks a lot.

Regards
Hisham

(in reply to hhammash)
Mosky

 

Posts: 73
Joined: 9/27/2002
Status: offline

 
RE: Add Close window Link - 10/23/2002 19:33:44   
I tried both Hisham' s and Charles' tips, they work fine but both require the users to answer " YES" , iis there any way to have the window closed immediately on click?

_____________________________

:)
Mosky

(in reply to hhammash)
hhammash

 

Posts: 1064
Joined: 8/19/2002
Status: offline

 
RE: Add Close window Link - 1/16/2003 10:10:54   
Hi Mosky,

It works without asking if there is a window open behind it, but if you are closing the last window it will ask.

I hope someone finds an answer.

I will look more into this.

Hisham

(in reply to hhammash)
Long Island Lune

 

Posts: 2340
Joined: 6/8/2002
From: New York
Status: offline

 
RE: Add Close window Link - 1/18/2003 0:16:18   
Here' s one that closes a window without the question popping up. Place this code at the top of your page:

<SCRIPT TYPE=" text/javascript" >
<!--
function popupform()
{ opener.location.reload ()
window.close()
}
//-->
</SCRIPT>


Heres your button code.

<input type=" submit" value=" Done " onClick=" popupform()" name=" B1" tabindex=" 1" >

Notice that in the Javascript code I placed opener.location.reload (). This will redisplay the window underneath if you need it updated. If you do not need that functionality, just remove that line, the window will close, no message will pop-up and the window beneath it will not be touched.

LLLuneeeeeee :)


_____________________________


(in reply to hhammash)
Long Island Lune

 

Posts: 2340
Joined: 6/8/2002
From: New York
Status: offline

 
RE: Add Close window Link - 1/18/2003 0:19:04   
I forgot to mention,

This code I placed inside the pop-up window. So when you click the button inside the pop-up, it closes. Is this what everybody was looking for???

LLLuneeeeeee :)

_____________________________


(in reply to hhammash)
hhammash

 

Posts: 1064
Joined: 8/19/2002
Status: offline

 
RE: Add Close window Link - 1/18/2003 2:42:38   
Hi Mark,

Yes indeed, this is what we were talking about.

I mentioned that when you put the close button on a new window and click it, you will not be asked whether you want to close or not as long as this page is not the only one open.

On a popup it will work fine because behind it there will be an open window; so that, it will close without asking.

Hisham

(in reply to hhammash)
Long Island Lune

 

Posts: 2340
Joined: 6/8/2002
From: New York
Status: offline

 
RE: Add Close window Link - 1/18/2003 18:09:28   
Great. Glad I could contribute.



_____________________________


(in reply to hhammash)
hhammash

 

Posts: 1064
Joined: 8/19/2002
Status: offline

 
RE: Add Close window Link - 1/18/2003 23:21:12   
Hi Mark,

You always do. :)

Hisham

(in reply to hhammash)
Long Island Lune

 

Posts: 2340
Joined: 6/8/2002
From: New York
Status: offline

 
RE: Add Close window Link - 1/19/2003 1:46:16   
Gracias!!!

_____________________________


(in reply to hhammash)
hhammash

 

Posts: 1064
Joined: 8/19/2002
Status: offline

 
RE: Add Close window Link - 1/19/2003 6:15:21   
Hi Mark,

It will be good if you can find a solution for the close button even for the last open window without asking yes or no.

Thanks
Hisham

(in reply to hhammash)
Long Island Lune

 

Posts: 2340
Joined: 6/8/2002
From: New York
Status: offline

 
RE: Add Close window Link - 1/19/2003 15:45:15   
Well, maybe we can make it like this:

If only the main window is open and person tries to close it, ignore the request???

This is tough. Remember when ONLY the browser main window is open, and you try to close it through code commands, your session is considered over. It considers this a possible error by the programmer. That is why IE asks you this. BUT - if you just go and click the X in the upper right hand corner of the browser window, it closes without asking you.

The difference between Code-Commands vs X button:

Code Commands - Was this an error line by the programmer? Any interpreter has to assume this because it knows no other window is open and your sending a command to close it. So to be sure they pop-up a prompt.

X Button - Human Interaction is different. I know I want to close the browser. There is no question in the interpreters mind. And no logic is being questioned as with Code commands.

Like you said eariler, it' s Okay when the button is in the pop-up itself becasue you KNOW a second window is open.

So what is needed is a link to close a window on the main page -that if pressed -will close a secondary window, or ignore the request if only the main window is open. " Conditional Closing" (without the prompt).




_____________________________


(in reply to hhammash)
hhammash

 

Posts: 1064
Joined: 8/19/2002
Status: offline

 
RE: Add Close window Link - 1/19/2003 15:49:32   
Hi Mark,

Thanks, that was clear and logical.

You did not reply if you can make web databases using C++?

Thanks friend,
Hisham

(in reply to hhammash)
Long Island Lune

 

Posts: 2340
Joined: 6/8/2002
From: New York
Status: offline

 
RE: Add Close window Link - 1/19/2003 16:56:31   
You can. Especially if you use an extended library geared for that type of work. I use the BDE as much as possible. If you have the time, the knowledge and the will, you can create your own custom database in C++. But in today' s demanding environment, most use aftermarket tools to assist them in their database creations. Speed spells cash. To create one raw from scratch in C++ is time consuming. But once you have done it, you can use it for many different projects. That' s a plus.

LLLuneeeeee :)

_____________________________


(in reply to hhammash)
hhammash

 

Posts: 1064
Joined: 8/19/2002
Status: offline

 
RE: Add Close window Link - 1/19/2003 17:28:52   
Thank you Mark,

Sorry I posted it here also.

Thanks a lot.


p.s: Please keep practicing and working on C don' t abandon it, otherwise you might forget it.

I was vey very good in dBase IV programming and FoxPro, I abandoned them for Access and now I can create the " Hello World" message in them.:):):)

(in reply to hhammash)
Long Island Lune

 

Posts: 2340
Joined: 6/8/2002
From: New York
Status: offline

 
RE: Add Close window Link - 1/19/2003 18:30:00   
I hear ya. I' ll never loose my C / C++ / Assembler experience. It' s far too valuable. I' d lose FP, HTML, DHMTL, FSO, VBS, ACCESS, ASP or SQL first.

LIFO:
" Last In First Out"

Your Friend,
LLLuneeeeeeee :)




_____________________________


(in reply to hhammash)
hhammash

 

Posts: 1064
Joined: 8/19/2002
Status: offline

 
RE: Add Close window Link - 1/20/2003 7:16:40   
Good to hear that.

Hisham

(in reply to hhammash)
Page:   [1]

All Forums >> Community >> OutFront Discoveries >> Add Close window Link
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts