Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jun 2002
    Location
    Auckland, New Zealand
    Posts
    60
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Opening html file into new window

    Hi

    I am still having problems with this script. I know it's a simple problem, but I just
    can't find the solution. When the user clicks on the arrow, the frameset should close,
    and entry.htm should be loaded. Have a look at the website so far,
    http://homepages.ihug.co.nz/~usateden/panacea/frameset/


    <script language="javascript">

    function back() {
    window.open('../entry.htm');
    window.top.close();
    }
    </script>
    </head>

    <body background="bg.GIF" bgproperties="fixed">
    <div align="right">

    <table border="0" cellpadding="0" width="90%">
    <tr>
    <td width="100%"><p align="left"><a href="java script:back();"><img
    src="backarrow.gif"


    Can anyone help with this please?

    bye
    Allyson

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    10,946
    Thanks
    0
    Thanked 236 Times in 233 Posts
    when i clicked the arrow, it says 'Object expected'

    try to rename your function back() to something else. back() is a reserved method

  • #3
    New to the CF scene
    Join Date
    Jul 2002
    Location
    DM, Iowa
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well, you've got a problem there. Unless you've opened the window WITH javascript, you can't close it without getting some type of warning (usually. some browsers dont follow this).

    Your current function:

    function back() {
    window.open('../entry.htm');
    window.top.close();
    }

    Try something like this instead:

    function back() {
    top.location.href="../entry.htm";
    }


    try to rename your function back() to something else. back() is a reserved method
    yeah, that too


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •