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 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Dec 2004
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    I am having trouble getting this form processor to open into another frame.

    Okay, to let you know alittle about the site that this is for.

    This script belongs to a Fantasy Football League which my ex boss created. He has been having problems creating the site due to him being brand spanking new to creating. I mean he has been using Yahoo to build it at first. His main site consists of 3 frames. A top banner, a left sided frame mainly full of links and navigational stuff, and the main frame which is for the loaded pages. He has a list box with links in it that he wants to load into the main frame. We both have no clue when it comes to Java Script, but I have alittle more edge than him. I have posted the whole script for the list box. I know the problem is in the form processor but I don't know enough to firgure it out. He got the script from a help site but he can't remember which one. I have tryed to figure it out by learning what each command means, but the books I have doesn't go into that much detail. Any help would be helpful. If you need a link to the actual site, email me at fez at jjstechnology dot com



    <tr>
    <td width="100%" align="center" height="19">
    <font color="#FF8000">
    <!--webbot bot="HTMLMarkup" startspan --><SCRIPT LANGUAGE="JavaScript">

    <!-- Begin
    function formHandler(form){
    var URL = document.form.site.options[document.form.site.selectedIndex].value;
    window.location.href = URL;
    }
    // End -->
    </SCRIPT>


    <center>
    <form name="form" target="main">
    <select name="site" size=1 onChange="javascript:formHandler()">
    <option selected>Select a Position


    <option value="http://www.chode.com/quarterbacks.htm">Quarterbacks
    <option value="http://www.chode.com/running_backs.htm">Running Backs
    <option value="http://www.chode.com/wide_receivers.htm">Wide Receivers
    <option value="http://www.chode.com/tight_ends.htm">Tight Ends
    <option value="http://www.chode.com/kickers.htm">Kickers
    <option value="http://www.chode.com/linebackers.htm">Linebackers
    <option value="http://www.chode.com/cornerbacks.htm">Cornerbacks
    <option value="http://www.chode.com/safeties.htm">Safeties
    <option value="http://www.chode.com/linemen.htm">Linemen

    </select>
    </form>
    </center>

    <!--webbot bot="HTMLMarkup" endspan --></font></td>
    </tr>

  • #2
    Senior Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    2,789
    Thanks
    2
    Thanked 14 Times in 14 Posts
    Please try the following



    <SCRIPT LANGUAGE="JavaScript">
    <!--
    function formHandler(){
    var URL = document["myform"]["site"].options[document["myform"]["site"].selectedIndex].value;
    parent.main.location = URL;
    }
    //-->
    </SCRIPT>

    <center>
    <form name="myform">
    <select name="site" size=1 onChange="formHandler()">
    <option selected>Select a Position
    <option value="http://www.chode.com/quarterbacks.htm">Quarterbacks
    <option value="http://www.chode.com/running_backs.htm">Running Backs
    <option value="http://www.chode.com/wide_receivers.htm">Wide Receivers
    <option value="http://www.chode.com/tight_ends.htm">Tight Ends
    <option value="http://www.chode.com/kickers.htm">Kickers
    <option value="http://www.chode.com/linebackers.htm">Linebackers
    <option value="http://www.chode.com/cornerbacks.htm">Cornerbacks
    <option value="http://www.chode.com/safeties.htm">Safeties
    <option value="http://www.chode.com/linemen.htm">Linemen

    </select>
    </form>
    </center>
    The silent one.

    The most dangerous thing in the world is an idea.
    The most dangerous person in the world is the one with an idea.

  • #3
    New to the CF scene
    Join Date
    Dec 2004
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thank You Very Much. That did it.

    Thank you very much Mr. J. it worked like a charm.
    BTW, you wouldn't be related to Mr. T. now would you.......LOL

    Thanks again,
    Fez

  • #4
    Senior Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    2,789
    Thanks
    2
    Thanked 14 Times in 14 Posts
    Glad to be of help.

    I would do away with the borders on the frames though and amend the contents of the left frame so that you do not get the horizontal scrollbar
    The silent one.

    The most dangerous thing in the world is an idea.
    The most dangerous person in the world is the one with an idea.


  •  

    Posting Permissions

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