-
please i need favor !
example :
in file index.htm
<frame name="main" SRC="1.htm">
<frame name="content" SRC="2.htm">
code in 1.htm :
..
...
<input type="button" value="Press">
that i want to ask ?
when the button "Press" is pressed..i want
frame "Content" replace Src="2.htm" with Src="3.htm"
thanks alot
-
Just use the following. It if the page is on 2.htm already it goes to 3.htm, otherwise it goes to 2.htm:
Code:
<script>
var i=0;
function changePageContents(){
if (i == 0){
parent.content.location="3.htm"
i=1}
else{
parent.content.location="2.htm"
i=0}}
</script>
<form>
<input type="button" value="Go To Page" onClick="changePageContents()">
</form>
-
Alternately you could try:
Code:
<INPUT TYPE=BUTTON VALUE="Press" onClick="parent.content.location.href='3.html'">
in your 1.html