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 2 of 2

Thread: focus() help

  1. #1
    Regular Coder
    Join Date
    Feb 2005
    Posts
    190
    Thanks
    25
    Thanked 0 Times in 0 Posts

    focus() help

    hi

    could ne1 give me a code of which a field will get focussed on when a certain value in a list field is selected?

    thanks vorl

  • #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
    PHP Code:
    <form>
    <
    select onchange="this.value=='focused'?this.form.txt.focus():null">
    <
    option selected>- choose -</option>
    <
    option value="foo">foo</option>
    <
    option value="focused">focus the textfield</option>
    <
    option value="fee">fee</option>
    </
    select>
    <
    input name="txt" type="text">
    </
    form
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*


  •  

    Posting Permissions

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