tab key access in jsp

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • karthickkuchanur
    New Member
    • Dec 2007
    • 156

    tab key access in jsp

    Hai,
    Iam using the struts ,i have put some button in the page ,the button i have put is just the image for look feel,i cant able to acess the image using the tab key(focus)i forced to use the mouse to click for submit
  • Dököll
    Recognized Expert Top Contributor
    • Nov 2006
    • 2379

    #2
    Can you tell us a little more? Looks like you are having issues with your keyboard. Which IDE are you using?

    Dököll

    Comment

    • Nepomuk
      Recognized Expert Specialist
      • Aug 2007
      • 3111

      #3
      Originally posted by Dököll
      Can you tell us a little more? Looks like you are having issues with your keyboard. Which IDE are you using?

      Dököll
      That is probably total nonsense. It shouldn't be anything to do with your IDE and I would be very surprised if it were a keyboard problem.

      Now, the OP wasn't very clear, but I assume this is JSP? (Because you said something about "page".) If you would show us the code you use to create and modify that button, I'm sure we could help you.

      Greetings,
      Nepomuk

      Comment

      • Dököll
        Recognized Expert Top Contributor
        • Nov 2006
        • 2379

        #4
        Com'on, be nice how you say this?

        I had two questions there:

        (1) I needed to know the IDE in question, that's a valid question
        (2) I did have a problem with my keyboard once where I had to use my mouse

        How's that for nonesense..

        You should know how to communicate to people you do not know, Charlie pants:-)

        Comment

        • Nepomuk
          Recognized Expert Specialist
          • Aug 2007
          • 3111

          #5
          I said it's probably nonsense! ^^

          Now, just to make sure: Does the keyboard work in all other situations? Including the Tab button? If so, it's no problem with your keyboard.

          About the IDE question - I agree that the OP may be using the GUI builder of some IDE, but the solution should be in the code anyway. A very widespread opinion about Swing is: Learn how to write GUIs manually and THEN you can start using GUI builders. That way, you understand what's underneath and can fix such problems.

          The reason I reacted like that is the same reason you received a few PMs lately. Sorry if I overreacted.

          Greetings,
          Nepomuk

          Comment

          • JosAH
            Recognized Expert MVP
            • Mar 2007
            • 11453

            #6
            The first IDE that's giving me trouble in the working of my program is one second away from the bit bucket. The source of the trouble must be searched for in the OP's code.

            kind regards,

            Jos

            Comment

            • chaarmann
              Recognized Expert Contributor
              • Nov 2007
              • 785

              #7
              Immediately jsp-pages come into my mind when the OP mentions "struts".
              Then mentioning "tab", "image" "button" and "submit" immediately directs me to html-elements.

              So I conclude that this is the problem:

              Code:
              <a href="javascript:alert('hello2')">
               <img onClick="javascript:alert('hello')">
              </a>
              <img onClick="javascript:alert('hello')">
              <input type=text>
              here, you can use the mouse and click on the first or second broken-image, triggering an alert. But if you position the cursor on the text-field and press tab-key repeatedly, you can't focus on the second image. But you can focus on the first image and press ENTER to trigger an alert.

              So the solution to the OP's question is provided in the first image: just wrap an anchortag around the image (<a>-tag) . And then remove the onClick-event, or both is triggered if you click!

              This article should be shifted to the html-forum. The OP mentions "struts", but it has nothing to do with java. (except if the image is created using a taglib...)

              Comment

              Working...