Skip to content Skip to sidebar Skip to footer

Unable To Replace Contents Of Frame Using Javascript From Another Frame

I have frameset defined as follows

Solution 1:

Use this instead:

top.frames["base_frame"].location = options;

instead of:

parent.base_frame.location.href = options;

it will work for u.

Where:

<frameset border="0" frameborder="0" rows="65,*">

        <frame src="index display on top" name="options">

        <frame src="pages i wanna display" name="base_frame">

    </frameset>

Solution 2:

You could assign an id to each frame and then do this, then replace your line with

document.getElementById('frame2').src= href;

I assume you already defined href in your code.


Post a Comment for "Unable To Replace Contents Of Frame Using Javascript From Another Frame"