Results 1 to 3 of 3

Thread: frame

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2000
    Posts
    1
    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


  2. #2
    Fanatic Member RealisticGraphics's Avatar
    Join Date
    Jul 1999
    Location
    Arkansas
    Posts
    655
    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

  3. #3
    Member
    Join Date
    Sep 2000
    Posts
    49
    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
  •  



Click Here to Expand Forum to Full Width