access frame child window from parent window

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • maminx
    New Member
    • Jul 2008
    • 77

    access frame child window from parent window

    hello, i have this frameset (frameset1.html )

    Code:
    <FRAMESET ROWS="55%" COLS="37%,63%" frameborder="no" framespacing="0">
    		  <FRAME NAME="runningTrade" id="runningTrade" SRC="" scrolling="no">
    		  <FRAMESET ROWS="33%" COLS="46%,55%">
    				<FRAMESET ROWS="33%,33%,35%" cols="*" frameborder="no">
    					<frame id="orderBook" name="orderBook" src="" scrolling="no">
    					<FRAME NAME="orderBook2" SRC="" scrolling="no" frameborder="1">
    					<FRAME NAME="OrderBook3" SRC="" scrolling="no">
    				</FRAMESET>		 
    				<FRAMESET ROWS="10%,41%,38%,11%" cols="*">
    					<frame src="" name="ihsg" id="ihsg" title="ihsg" scrolling="no"/>
    					  <FRAME NAME="watchTab" SRC=""  scrolling="no">
    					  <FRAME NAME="openOrder" SRC="" scrolling="no">
    					 
    					 <FRAME NAME="rejectedOrder" SRC="" scrolling="no" style="overflow-x:hidden">
    				</FRAMESET>
    		  </FRAMESET>
    	<NOFRAMES>
    	    <BODY>
    	      <H1>Your Browser doesn't support FRAMESET</H1>
    	    </BODY>
    	  </NOFRAMES>
    </FRAMESET>
    and from parent window (index.html), i popup that frameset1.html with this code
    Code:
    var objWinFrame = window.open('frameset1.html','','height=500, width=500, top=80, left=60, scrollbars=no, statusbar=no, toolbar=no, resizable=yes');
    And the last, i want to access (change location) the frame "orderBook" (in frameset1.html) from parent with this code
    Code:
    objWinFrame.frames.orderBook.location = "blabla.html";
    but it returns undefined/error

    help please, thanks
    regards
    maminx
  • johny10151981
    Top Contributor
    • Jan 2010
    • 1059

    #2
    what is orderBook you didnt define any order book in your frame set. I think you forgot to name one of your objects or gave wrong name.

    Comment

    • maminx
      New Member
      • Jul 2008
      • 77

      #3
      should i named "orderBook" in frameset instead in frame?
      please see frameset1.html
      orderBook is the name of frame in frameset, and i want to change the source/location of orderBook frame

      please let me know if i have a mistake
      thanks for u'r reply

      Comment

      • johny10151981
        Top Contributor
        • Jan 2010
        • 1059

        #4
        well i didnt notice that.

        try this
        Code:
        objWinFrame.orderBook.location = "blabla.html";

        Comment

        • maminx
          New Member
          • Jul 2008
          • 77

          #5
          it returns error "objWinFrame.or derBook is undefined"

          Comment

          Working...