Results 1 to 7 of 7

Thread: How to select which frames open in a new window

  1. #1
    Join Date
    May 2014
    Posts
    203
    Thanks
    28
    Thanked 5 Times in 5 Posts

    Default How to select which frames open in a new window

    i have a html frameset i'm using to act like a place to hold game player choices, primarily because they stick to the player's window statically thru out the game and as a result, act similar to saving player choices to a database. currently, there's a side frame, a footer frame and a main window frame. however, i need to occasionally break out of the footer frame, while retaining the already selected data in the side frame. how do you break out of 1 frame in your frameset without losing the stickiness in the other frames?

    or even better is there a way to modify the size of the frames between page clicks? for example

    Code:
    <frameset cols="12%,*"  frameborder="0" border="0" framespacing="0" >
    	<frame name="menu" src=".html" marginheight="0" marginwidth="0" scrolling="no" >
    	<frame name="content" src=".html" marginheight="0" marginwidth="0" scrolling="no" >
    
    	
    </frameset>
    upon click, changed to

    Code:
    <frameset cols="22%,*"  frameborder="0" border="0" framespacing="0" >
    	<frame name="menu" src=".html" marginheight="0" marginwidth="0" scrolling="no" >
    	<frame name="content" src=".html" marginheight="0" marginwidth="0" scrolling="no" >
    
    	
    </frameset>
    without effecting the stickiness of the data in the frames?

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    jundo12 (05-03-2014)

  4. #3
    Join Date
    May 2014
    Posts
    203
    Thanks
    28
    Thanked 5 Times in 5 Posts

    Default

    thanks. so a link click on another page that uses that script, can resize (not close) a targeted frame on the page that's being linked, when you click the link?

  5. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    The link can change the size (to 0 if desired) of a frame in the parent (frameset page). If you also want that link to do other things at the same time, it can, ex:

    Code:
    <a href="some.htm" onclick="parent.resizeFrame('*,0'); return true;">Some page</a>
    Of course you can also use it in the 'normal' way as shown on the demo page.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. #5
    Join Date
    May 2014
    Posts
    203
    Thanks
    28
    Thanked 5 Times in 5 Posts

    Default

    it works great except it didn't want to work in google chrome. when clicked, nothing happened. so i got a new bit of javascript to add to it, that tells it to open in the named frame window. here's the whole thing

    Code:
    <a href="mypage.html" onclick="parent.resizeFrame('*,2'); 
    
    parent.content.location='mypage.html'">
    it also doesn't work in google chrome but it does work in ff and ie. anyway to resolve that?
    Last edited by jundo12; 05-08-2014 at 10:23 PM.

  7. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Google Chrome sometimes has issues with frames unless the pages are all live. Have you tried it live, or are you still just experimenting locally?
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  8. The Following User Says Thank You to jscheuer1 For This Useful Post:

    jundo12 (05-09-2014)

  9. #7
    Join Date
    May 2014
    Posts
    203
    Thanks
    28
    Thanked 5 Times in 5 Posts

    Default

    oh, i didn't think to try that. you are right! yep it works live. thanks

Similar Threads

  1. Open Window Widget from a select form
    By jawaka in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 04-19-2010, 09:31 AM
  2. Make script to open in frames?
    By a01020304 in forum JavaScript
    Replies: 0
    Last Post: 01-13-2010, 10:51 PM
  3. Replies: 2
    Last Post: 03-14-2009, 05:32 PM
  4. Make page open in frames only
    By Feckie in forum HTML
    Replies: 1
    Last Post: 12-21-2007, 07:07 PM
  5. Open select links in new window.. cookie?
    By Luna C in forum Dynamic Drive scripts help
    Replies: 8
    Last Post: 03-25-2005, 11:39 AM

Bookmarks

Posting Permissions

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