Results 1 to 6 of 6

Thread: Frame with textbox and two combobox, plus a buttom

  1. #1
    Join Date
    Nov 2010
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Frame with textbox and two combobox, plus a buttom

    Well, I have those objects, my problem is:
    I enter the text for a search, choose the combobox of my preference, and push search buttom, so far, so good; the responce of the search appear in two frames below of the "top" frame with a form with the objects mentioned earlier,ok! but after push the buttom, the text and the selections of the combobox resets, I wanna keep that info while the visitor is in my page...someone can help me? please and thanks in advance...

  2. #2
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    Its very difficult to try and visualise what you describe - i'm lost - please post a link to your page.
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

  3. #3
    Join Date
    Nov 2010
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    It´s my project of a html course, I´m not have page, well not yet, maybe with the code:
    <SCRIPT language="JavaScript">
    function vacio(t2)
    {
    for ( i = 0; i < t2.length; i++ ) {
    if ( t2.charAt(i) != " " ) {
    return true
    }
    }
    return false
    }

    function valida()
    {

    var F=document.form1.texto.value;

    if( vacio(F) == false ) {
    return false
    } else {
    change2()
    }

    }

    function change2()
    {

    parent.left_frame.location=document.form1.combo1.options[document.form1.combo1.selectedIndex].value+document.form1.texto.value;

    parent.right_frame.location=document.form1.combo2.options[document.form1.combo2.selectedIndex].value+document.form1.texto.value;


    }


    //-->
    </HEAD>
    </CENTER>
    </SCRIPT>
    <input type="submit" name="q" id="q" class="boton" value="Search" onclick="javascript:valida()"/>
    </label> <p>
    <span class="title">Choose</span></p>
    <p>
    <label for="combo1"></label>
    <select name="combo1" id="combo1">
    <option value="http://www.google.com/search?q=" selected="selected">Google</option>
    <option value="http://search.yahoo.com/search?p=">Yahoo</option>
    &amp;
    <label for="combo2"></label>
    <select name="combo2" id="combo2">
    <option value="http://www.bing.com/search?q=">Bing</option>
    <option value="http://es.ask.com/web?q=">Ask</option>
    </select>
    </p>
    </form>
    </CENTER>
    </BODY>
    </html>

  4. #4
    Join Date
    Nov 2010
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    </HEAD>
    <SCRIPT language="JavaScript">
    var gtext;
    var gcombo1;
    var gcombo2;
    </SCRIPT>
    <frameset rows="220,*" border="0" cols="*">
    <frame src="top.htm" name="top_frame">
    <FRAMESET cols="50%,50%">
    <FRAME SRC="Left.htm" name="left_frame">
    <FRAME SRC="Right.htm" name="right_frame">
    </FRAMESET></FRAMESET><noframes></noframes>
    <body>
    </body>
    </html>

  5. #5
    Join Date
    Nov 2010
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I wanna keep the text and the combobox selection after click search

  6. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    We generally don't do homework assignments here. If you've really made an effort we may give suggestions.

    It's hard to tell even that though, so much code to wade through, that at least can be made a little easier if you format it in your posts:

    In the future, please enclose code in:

    [CODE]
    code goes here
    [/CODE]

    tags so it will look like:

    Code:
    code goes here
    But for this type of request we would like to see you narrow down the problem for us so we don't have to wade through so much stuff to find it.

    Putting up a live demo helps too, we can then use various tools to identify errors, etc., without having to first attempt to reconstruct your page from your posts.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

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