|
-
Oct 13th, 2000, 11:17 PM
#1
Thread Starter
New Member
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
-
Oct 14th, 2000, 09:11 AM
#2
Fanatic Member
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>
www.RealisticGraphics.net
Running VS.Net Enterprise & VB 6
Other Languages: JavaScript, VBScript, VBA, HTML, CSS, ASP, SQL, XML
MSN Messenger: kmsheff
-
Oct 16th, 2000, 04:04 AM
#3
Member
Alternately you could try:
Code:
<INPUT TYPE=BUTTON VALUE="Press" onClick="parent.content.location.href='3.html'">
in your 1.html
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|