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 4 of 4

Thread: javascript woes

  1. #1
    New to the CF scene
    Join Date
    Jun 2003
    Location
    Oxford, England
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    javascript woes

    I was hoping someone could help me - I am trying to get a button to load a new frameset into the same window but am having some difficulty. The button resides in the head frame, and I'd like a different frameset to be loaded into the same window, but to take over the entire window from the existing frameset.

    Any ideas?

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    FL, USA
    Posts
    734
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You mean somthing like this


    <script language="javascript">

    function takeOver(){

    parent.FrameName.href="whatever.html"

    }

    </script>

    <input type="button" value="CLICK ME" onclick="takeOver()">
    CYWebmaster.com - See why we dot com!!
    ACJavascripts.com - Cut & Paste Javascripts!
    SimplyProgram.com - Personal Blog

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Posts
    626
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I think what you want is this:
    parent.location.href="whatever.html"
    or:
    top.location.href="whatever.html"

    either one should work.

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Location
    FL, USA
    Posts
    734
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hey thanks for fixing my error requestcode!!

    I can't belive I missed that lol
    CYWebmaster.com - See why we dot com!!
    ACJavascripts.com - Cut & Paste Javascripts!
    SimplyProgram.com - Personal Blog


  •  

    Posting Permissions

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