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 6 of 6
  1. #1
    New Coder
    Join Date
    Jun 2002
    Location
    Auckland, New Zealand
    Posts
    60
    Thanks
    0
    Thanked 0 Times in 0 Posts

    closing framesets

    Hi

    I'm having problems in closing my frameset and then loading a new html file into the window. I've discovered that window.close() does not close frameset windows.

    Has anyone used

    int sm_jclose( void );

    I've tried using this in the website I am designing but it still does not work.

    bye
    Allyson

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,048
    Thanks
    0
    Thanked 251 Times in 247 Posts
    to close a frameset, top.close()
    but if you just want to load a new html without frames from a frameset page, no need to close it, just:
    top.location.href='new.htm'

  • #3
    New Coder
    Join Date
    Jun 2002
    Location
    Auckland, New Zealand
    Posts
    60
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi

    I tried using top.location.href='....' but it still does not work when the function is called. The website that I'm designing is at http://homepages.ihug.co.nz/~usateden/panacea/frameset Is the function in the wrong place, maybe it should be in <body>.

    The arrow, saying 'Back to Palette' calls up the navart() function, but nothing happens. In IE, and error message is generated. Any more suggestions to solve this problem would be greatly appreciated. I'm determined to solve it.

    <script language="javascript">


    function navart() {
    top.location.href='http://homepages.ihug.co.nz/~usateden/panacea/entry.htm';
    }


    </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="javascript:navart()"><img src="backarrow.gif"



    bye
    Allyson

  • #4
    Banned
    Join Date
    Jun 2002
    Location
    Australia
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts
    <a target="_top" href="http://homepages.ihug.co.nz/~usateden/panacea/entry.htm"><img src="backarrow.gif"></a>

  • #5
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,048
    Thanks
    0
    Thanked 251 Times in 247 Posts
    winlineau's suggestion will also work.
    But it's weird that your existing solution doesn't work. It should work. The error says, 'Object expected' but the function navart() is existing and I see no typo error. Can you insert an alert() inside the navart() function to see if it's executed before the error appears?

  • #6
    New Coder
    Join Date
    Jun 2002
    Location
    Auckland, New Zealand
    Posts
    60
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile

    Hi

    Thank-you. I tried alert() and discovered that navart() was not functioning. I don't know why.

    But target='_top' worked well, and does exactly what I wanted. So, thankyou

    bye
    Allyson


  •  

    Posting Permissions

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