Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

input field focus

Posted on 2013-01-10
5
Medium Priority
?
222 Views
Last Modified: 2013-01-23
I have the app upon clicking the button I am selecting fields add put then on the main form. That part works however when the fields are displayed the focus is only on the first drop down what makes it difficult to select a value from the second drop down. I think something has to do with focus
0
Comment
Question by:erikTsomik
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 12

Expert Comment

by:jessegivy
ID: 38764254
A little more info about what you want to accomplish?

You're aware that only one element on a page can have focus?

There is a JavaScript function where you can set the focus of an element, it's called focus(). Example: document.getElementById("elementID").focus(), where "elementID" is the id of the field you want to have focus.

Cheers,

JI
0
 
LVL 19

Author Comment

by:erikTsomik
ID: 38764261
right but Once i select something  and i need to go a diff drop down it does not let me make a selection because because of the focus of the first element
0
 
LVL 30

Expert Comment

by:LZ1
ID: 38764282
Can you post a live link?
0
 
LVL 19

Author Comment

by:erikTsomik
ID: 38764301
there is no link because I working locally. but the code is below . or may be because it is inside of the table

<table style="border:0px solid none;margin:10px;" id="270">
                                                            
                                                                  <tbody><tr id="p_16">
                                                                        <td width="4%"><img width="16" height="17" onclick="DeleteBody(16,4,270);return false;" title="Delete This Record" alt="Delete This Record" src="/includes/images/icon_delete.gif" class="delete" id="i_16"></td>
                                                                        <td width="50%"><b> tr. test</b></td>
                                                                  </tr>
                                                                  <tr id="pd_16">
                                                                        <td colspan="2">
                                                                              <div style="margin:20px;" id="test4_16">

      

      
                                          <br>
                                          <label>

                                                 <span><b> Employee of the year</b></span>
                                                 
                                                       <select  id="RD16_3" name="RD16_3">
                                                            <option value="">Please choose an option here</option>
                                                            
                                                                        <option value="1">1</option>
                                                                  
                                                                        <option value="2">2</option>
                                                                  
                                                                        <option value="3">3</option>
                                                                  
                                                      </select>
                                                      
                                                      <br>
                                          </label>
                                    
                  <label>
                        <span><b>Cell Carrier</b></span>
                        
                              <select class="validate[]" id="RD16_5" name="RD16_5">
                                    <option value="">Please choose an option here</option>
                                    
                                          <option value="1">3 River Wireless</option>
                                    
                                          <option value="2">ACS Wireless</option>
                                    
                                          <option value="3">Alltel</option>
                                    
                                          <option value="4">AT&amp;T</option>
                                    
                                          
                                    
                                          
                                    
                              </select>
                        
                  </label>
            </div>
                                                                              
                                                                        </td>
                                                                  </tr>
                                                            
                                                      </tbody></table>
0
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 2000 total points
ID: 38764453
I don't see anything that changes focus.  Just add an onchange event to the first select:

<select  id="RD16_3" name="RD16_3" onchange="document.getElementById('RD16_5').focus();">

Cd&
0

Featured Post

The top UI technologies you need to be aware of

An important part of the job as a front-end developer is to stay up to date and in contact with new tools, trends and workflows. That’s why you cannot miss this upcoming webinar to explore the latest trends in UI technologies!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
In this Micro Tutorial viewers will learn how to create a CSS image sprite (In a later tutorial, viewers will learn how to use CSS and HTML to create a navigation menu using this sprite) Open a new Photoshop document with a width of (Icon width)x(N…
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question