Search across frames

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • imtiyaz quraish
    New Member
    • Mar 2011
    • 7

    Search across frames

    Hi,

    I've a webpage divided into 3 frames like this
    Code:
    <frameset rows="40,*" bordercolor="white" border="1">
    	<frame name="banner" noresize="noresize" scrolling="no" src="1.html">
    	<frameset cols="240,*">
    		<frame name="contents" src="2.html">
    		<frame name="main" src="3.html">
    	</frameset>
    </frameset>
    In the top frame I've to add a search box which will highlight the terms and words present in frame with name 'main'. I'm trying to use the 'searchhi.js' which is working fine if both the content and the search box is in the same page. Please, help me out in pointing me a way to communicate across frames. I cannot use any hidden input field in 3.html as I'll be working with a lot of pages to be loaded in that 3rd frame.
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    To access any frame, e.g. main, from any page:
    Code:
    top.main
    top takes you straight to the topmost parent. You could use parent, but if you have nested frames, you'll have to remember how many to go up.

    Comment

    • imtiyaz quraish
      New Member
      • Mar 2011
      • 7

      #3
      thanks acoder, I'll try this in my code and will let you know if it worked or not.

      Comment

      Working...