[ale] Another JavaScript Question

Larry Grenevitch lg1450 at bellsouth.net
Mon Sep 30 19:42:43 EDT 2002


It looks like you are doing it the hard way.....

Rather than opening a new List (Which I assume is a new window you should just 
use the confirm dialogue on a javascript button.

The following two lines is a single line....

<input type=button onClick="javascript:closeNavigation();" name=ButtonName 
Value=" Close " size=9 style="font:bold 8pt Arial;color: black" >


function closeNavigation() {
    if (confirm("Close Window") ) {
        top.close();
        return 0;
    } else {
          document.location.reload(); //I would just do a return instead
    }
}


On Monday 30 September 2002 11:17 am, cfowler wrote:
> Here is a piece of java script.  This is the navigation frame from a 3
> frame homepage.  I added the logout entry to just close the window.  It
> prompts the user if he/she wishes to clse the window.  If they say no it
> seems to refresh all 3 frames.  A side effect is that I now have 4 frame
> and the extra one is a copy of the third.  If I repeat I get 5 frames.
> Is there a fix or am I doing something wrong?
>
>
>
>         var logout = new List(false, width, height, "#FFFFD0");
>         l.addList(logout, "<a href=/  OnClick='closeNavigation(); return
> 1' >Logout</a>");
>
>         l.build(0,0);
> }
>
> function closeNavigation() {
>         top.close();
>         return 0;
> }
>
> function redo()
> {
>   document.location.reload();
> }
>
>
>
> ---
> This message has been sent through the ALE general discussion list.
> See http://www.ale.org/mailing-lists.shtml for more info. Problems should
> be sent to listmaster at ale dot org.


---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.






More information about the Ale mailing list