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

    Question text field with a search popup

    hi all,

    I want to create a text field, in that text field when the user type few letters of the related word automatically similar words has to list in the popup, the list I can set on the .js file or anther text file, please give me a help for this


  • #2
    Senior Coder
    Join Date
    Mar 2005
    Location
    Portsmouth UK
    Posts
    4,511
    Thanks
    3
    Thanked 504 Times in 491 Posts
    Vic

    God Loves You and will never love you less.

    http://www.vicsjavascripts.org/Home.htm

    If my post has been useful please donate to http://www.operationsmile.org.uk/

  • #3
    New Coder
    Join Date
    May 2006
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts
    hi
    this javascript coding might help u.but you have to improve the code according to u r requirement. following javascript code will open a popup window and get the value u typed in parent page.This code will open the popup window as u type single letter.for filtering list you need to write more code.

    //copy and save following code as popup.php
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>

    <body>
    <form name="form1" method="post" action="">
    <input type="text" name="txtTest" onKeyUp="popup();">
    </form>
    </body>
    </html>
    <script>
    function popup () {


    window.open('test.php','window','left=0,top=0,width=720,height=300,scrollbars=yes,status=yes,resizab le=0');


    }
    </script>


    //copy and save following code as test.php

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>

    <body>
    <form name="form1" method="post" action="">
    <input type="text" name="txtLetter">
    </form>
    </body>
    </html>
    <script>

    document.form1.txtLetter.value = window.opener.document.form1.txtTest.value;

    </script>


  •  

    Posting Permissions

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