Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9181591
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T18:21:11+00:00 2026-06-17T18:21:11+00:00

When a user clicks on a tab of a tabbed table, I want to

  • 0

When a user clicks on a tab of a tabbed table, I want to be able to set the focus tot the first field on that tab.

Each tab seems to only have one event mouse onclick. So I tried placing the following code in one of that tab’s onclick events.

var f = dojo.byId('#{id:NotInvitedMsg}');
if (f != null)
   f.focus();

But when I click on the tab nothing happens. And I mean nothing. The tab can no longer be selected and the script is never executed.

Any way around this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T18:21:12+00:00Added an answer on June 17, 2026 at 6:21 pm
    <?xml version="1.0" encoding="UTF-8"?>
    <xp:view xmlns:xp="http://www.ibm.com/xsp/core">
        <xp:tabbedPanel id="tabbedPanel1">
            <xp:tabPanel label="New Tab" id="tabPanel1">
                <xp:panel>
                    <xp:inputText id="inputText1"></xp:inputText>
                    <xp:eventHandler event="onClientLoad" submit="false">
                        <xp:this.script><![CDATA[var edit = dojo.byId("#{id:inputText1}");
    if (edit) {
        edit.focus()
    }]]></xp:this.script>
                    </xp:eventHandler>
                </xp:panel>
            </xp:tabPanel>
            <xp:tabPanel label="New Tab2" id="tabPanel2">
                <xp:panel>
                    <xp:inputText id="inputText2"></xp:inputText>
                    <xp:eventHandler event="onClientLoad" submit="false">
                        <xp:this.script><![CDATA[var edit = dojo.byId("#{id:inputText2}");
    if (edit) {
        edit.focus()
    }]]></xp:this.script>
                    </xp:eventHandler>
                </xp:panel>
            </xp:tabPanel>
        </xp:tabbedPanel>
    </xp:view>
    

    This is working code (tested on Chrome and IE9). It uses simple trick I saw few days ago (and I want to apologize to original author, I couldn’t manage to find the original post): to create onClientLoad event at XP/CC level, and to move event handler in source view into the panel body. Works like charm…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to remove a badge as soon as the user clicks another tab.
I want to display activity indicator when user clicks on Tab Bar. How do
I have a tabbed application with 3 tabs The first tab is a table
When user clicks hyperlink on my ASP.NET page, I want a new browser to
When user clicks on select box , I want to hide the options menu
When a user clicks a table row, I use jQuery to select the link
When a user clicks a submit button I want the form to be submitted.
I am new to Javascript I want to create tabbed menu bar in that
I have this code for a Tabbed area, but when a user clicks a
My application has one activity and 5 fragments. When user clicks on tab Fragment1,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.