Hello all,

I have this code in an iframe

<FORM><INPUT TYPE="BUTTON" VALUE="Go Back"
ONCLICK="history.go(-1)"></FORM>

it works fine but i need it to taget another iframe on the page and change that iframe and go back in its own iframe

Thanks in advance.

Am not sure if this is what you need.

<!-- Assuming that this the targeted frame in your page -->
<iframe id="frame1"  src="myPage.html" width="700" height="700"></iframe>

<FORM><INPUT TYPE="BUTTON" VALUE="Go Back"
ONCLICK="document.getElementById('frame1').contentWindow.location = 'someLocation.html';"></FORM>

<!-- Just another option -->

<FORM><INPUT TYPE="BUTTON" VALUE="Go Back"
ONCLICK="document.getElementById('frame1').src = 'someLocation.html';"></FORM>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.