Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Jul 2003
    Location
    Philadelphia, PA
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question How to use radio buttons for navigation in frames???

    Hello and in advance, thank you.
    What it is that I am attempting to do is use radio buttons as a source of navigational tool. I have the buttons in place and it works, to an extent.
    My page consist of 2 frames; a top (parent frame) and bottom frame. I am very new at this, so please bare with. The code on my index.html, that holds the frameset, is as follows:

    <html>

    <head>

    <title>Sister ~2~ Sister Love</title>

    </head>

    <frameset FRAMEBORDER=0 FRAMESPACING=0 BORDER=0 rows="140,*">

    <!--- Logo --->
    <frame src="logo.html" BORDERCOLOR="000000" FRAMEBORDER=0 FRAMESPACING=0 MARGINHEIGHT= 0 MARGINWIDTH= 10 SCROLLING="NO">

    <!--- Nested frame --->
    <frameset FRAMEBORDER=0 FRAMESPACING=0 BORDER=0 COLS="100%,*">

    <!--- sister2sister pages --->
    <frame src="s2s2.html" name="frame1">

    </frameset>

    </frameset>

    </html>


    The code in the logo.html, the one that has the radio buttons, is as follows:


    <html>

    <head>

    <title>Sister ~2~ Sister Love Title Logo</title>


    <SCRIPT LANGUAGE="JavaScript">

    <!-- Begin
    function go(loc) {
    window.location.href = loc;
    }
    // End -->
    </script>

    </head>


    <BODY BACKGROUND="powerofprayerbkg.jpg" BGCOLOR="#634212" TEXT="#6D596C"><BR>


    <CENTER>

    <p><FONT FACE="VIVALDI" SIZE=6><B>Sister 2 Sister Love</FONT>
    <FONT FACE="VIVALDI">The power of prayer.</B></FONT></p>

    <form name="form">

    <CENTER>

    <TABLE BORDER=3 CELLSPACING=0 CELLPADDING=0 WIDTH="100%" background="6.gif" BORDERcolor="#634212">

    <TR>

    <TH><input type="radio" name="loc" onClick="go('s2s2.html');">Home</TH>

    <TH><input type="radio" name="loc" onClick="go('http://javascript.internet.com/');">Founder</TH>

    <TH><input type="radio" name="loc" onClick="go('meeting.html');">Meeting Schedule</TH>

    <TH><input type="radio" name="loc" onClick="go('happinings.html');">Events</TH>

    <TH><input type="radio" name="loc" onClick="go('prayrequest.html');">Prayer Request</TH>

    <TH><input type="radio" name="loc" onClick="go('happinings.html');">Testimonies</TH>

    </TR>

    </form>



    </body>

    </html>


    Now, I have the buttons working, but they all open up in the parent frame and not the bottom one. I would like the pages to open in the bottom frame, only.
    This is the code in one of the pages that i want to open in bottom frame by the click of the radio button:


    <html>

    <HEAD>

    <script language="Javascript">

    if (top.location == self.locationframe1') { top.location = 'index.htm'}//--></script>

    </HEAD>

    <BODY BACKGROUND="powerofprayerbkg.jpg"><NOBANNERS><BR>

    <CENTER>

    <TABLE BORDER="2" CELLSPACING="0" CELLPADDING="9" WIDTH="94%" BACKGROUND="powerofprayerbkg1.jpg" BORDERCOLOR="#C2AA80" BORDERCOLORDARK="000000">

    <TR><TD WIDTH="100%">

    <CENTER>

    <TABLE BORDER="0" CELLSPACING="0" CELLPADDING="12" WIDTH="100%" BACKGROUND="powerofprayerbkg3.jpg" bgcolor="#F3E9EE">

    <TR><TD WIDTH="100%">

    <CENTER>

    <TABLE BORDER="0" CELLSPACING="0" CELLPADDING="5" WIDTH="100%" BACKGROUND="powerofprayerbkg4.jpg" bgcolor="#7E667C">

    <TR><TD WIDTH="100%">

    <CENTER>

    <TABLE BORDER="0" CELLSPACING="0" CELLPADDING="15" WIDTH="100%" BACKGROUND="powerofprayerbkg5.jpg" bgcolor="#6E566C">

    <TR><TD WIDTH="100%">

    <CENTER>

    <TABLE BORDER="1" CELLSPACING="0" CELLPADDING="0" WIDTH="100%" BACKGROUND="5.gif" bgcolor="#E2C9D6" BORDERCOLOR="#B890B6"><TR><TD WIDTH="100%"><P><BR>

    <P><H1 ALIGN=CENTER>Meeting Schedule</H1>
    <FONT SIZE=1><I>All meetings are held on the 2nd Friday of each month. With exception to holidays. All updates will be noted on this page.</I></FONT></P><BR><BR>
    <P><h3 align=center>Mt. Zion United Methodist Church<br>921 Main Street<br>Darby, PA<br>7:00 pm to 10:00 pm</h3></p><br>
    <P>All are welcome to join us. Each meeting is filled with enlightening conversation and prayer. Meetings are hosted by members. Occasionally guest speakers are in attendance and desire all to be on time.</P>
    <div align="center">
    <center>
    <table border="5" cellpadding="2" width="65%" id="AutoNumber1">
    <tr>
    <td width="100%">
    </tr>
    </table>
    </center>
    </div>

    </TD></TR></TABLE></CENTER>
    </TD></TR></TABLE></CENTER>
    </TD></TR></TABLE></CENTER>
    </TD></TR></TABLE></CENTER>
    </TD></TR></TABLE></CENTER><P>

    </body>

    </html>


    With reading this, does anyone know of a way to have the linked pages open in the bottom frame and not the top. I have tried a few script changes, but none have worked. It will be greatly appreciated for any help. Once again, thank you.

  • #2
    New Coder
    Join Date
    Mar 2003
    Posts
    71
    Thanks
    0
    Thanked 0 Times in 0 Posts
    you can't target buttons like you would regular links. Sorry I don't know the code, but it has to do with either a js include or a stylesheet. But if someone knows this, please help out, cuz i want to know this too.

  • #3
    Regular Coder
    Join Date
    Nov 2002
    Posts
    596
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Try this:

    function go(loc) {
    top.frame1.location.href = loc;
    }

    Also...got a typo in your framebuster:

    if (top.location == self.locationframe1')

    Lose the red bit...I assume there's a reason you're nesting another 'one-framed' frameset in there, dumping data into it (or something). Otherwise it overcomplicates things.

    <frameset FRAMEBORDER=0 FRAMESPACING=0 BORDER=0 COLS="100%,*">

    OK, I'll 'bare' with you; you go first....

    cheers, cbp

  • #4
    New to the CF scene
    Join Date
    Jul 2003
    Location
    Philadelphia, PA
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by cheesebagpipe


    OK, I'll 'bare' with you; you go first....


    -LOL- I am not sure what you mean, but if you can please explain?

    I did try what you suggested and it worked. I am so grateful for your prompt and accurate reply. Once again, but not enough, thank you.

  • #5
    Regular Coder
    Join Date
    Nov 2002
    Posts
    596
    Thanks
    0
    Thanked 0 Times in 0 Posts
    & thank you, too...

    --


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •