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
    May 2005
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How do I get this combobox to open page in another frame?

    Code:
    function gone()
    {
    location=document.jumpy.example.options[document.jumpy.example.selectedIndex].value
    }
    //-->
    </script>
    
    </form>
    What do I change for this combobox to open the page in another frame?

  • #2
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    function gone()
    {
    window.open(document.jumpy.example.options[document.jumpy.example.selectedIndex].value,'framename')
    }
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #3
    New to the CF scene
    Join Date
    May 2005
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thank you very much, I have to start learning this stuff and stop cuting and pasting

  • #4
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    the method is

    window.open(url,target,attributes)

    The method's arguments are all strings (or variables set as strings). Attributes must be separated by commas ('width=500,height=300,left=10'). Target and attributes are optional. If no target, the default target is _blank. If no attributes, the opened window has different size and position according to the browser type. Attributes may hide scroolbar, location bar, toolbar and so on...

    See also
    http://www.devguru.com/Technologies/.../win_open.html
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #5
    Senior Coder
    Join Date
    Apr 2005
    Posts
    1,051
    Thanks
    0
    Thanked 0 Times in 0 Posts
    JS
    Code:
    function mnu_func(opt){
    	var myOpt = document.getElementById("mnu_"+opt);
    	var myFrame = document.getElementById('frameID');
    	myFrame.src = myOpt;
    	myFrame.focus();
    }
    HTML
    Code:
    <select onChange="mnu_func(this.selectedIndex)">
    	<option id="mnu_0" value="option1.html">option1</option>
    	<option id="mnu_1" value="option2.html">option2</option>
    	<option id="mnu_2" value="option3.html">option3</option>
    	<option id="mnu_3" value="option4.html">option4</option>
    	<option id="mnu_4" value="option5.html">option5</option>
    	<option id="mnu_5" value="option6.html">option6</option>
    	<option id="mnu_6" value="option7.html">option7</option>
    	<option id="mnu_7" value="option8.html">option8</option>
    </select>
    however I think this will only work with iframes.

    for frames using frameset you might have to replace
    var myFrame = document.getElementById('frameID');

    with

    var myFrame = parent.frameName;
    (also might want to try self.frameName - i havn't tested this).
    public string ConjunctionJunction(string words, string phrases, string clauses)
    {
    return (String)(words + phrases + clauses);
    }
    <--- Was I Helpfull? Let me know ---<


  •  

    Posting Permissions

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