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

  • SEARCH
  • Home
  • 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 7017725
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:57:06+00:00 2026-05-27T22:57:06+00:00

i have a textbox inside td i want textbox to fire td.click function on

  • 0

i have a textbox inside td
i want textbox to fire td.click function on focus so that i can get row n column number to get its text and send to web method
but user wont click td so can i achieve this??

$('td').click(function(){
  var col = $(this).parent().children().index($(this));
  var row = $(this).parent().parent().children().index($(this).parent());
  alert('Row: ' + row + ', Column: ' + col);
});

mark up

<table>
<tr><td>e1</td>e2<td>e3</td></tr>
<tr><td>e1</td>e2<td>e3</td></tr>
<tr><td>e1</td>e2<td>Textbox</td></tr>
</table>
  • 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-05-27T22:57:07+00:00Added an answer on May 27, 2026 at 10:57 pm

    There is an element.trigger method, that you could use to do it.

    The other problem is to get a textbox a focus event fires. TD doesn’t have a focus state but in some browsers you can emulate it by setting an tabindex attribute. Maybe it’s better to use form elements (input) so it can be focused by default.

    But you will get another problem when it will be clicked than event will be fired two times – on your click and on focus the element. You can play with event bubbling, but i think better way is to set it only on focus.

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

Sidebar

Related Questions

I have to add a textbox inside a form that is composed of a
I have a Window that has two primary areas. One is a TextBox inside
I have a textbox that I want to validate, but when I validate it
I have created a control and added a TextBox inside that control, I am
I have a UserControl that incorporates a textbox. I want to set the keyboardfocus
I have a custom control an inside of it I have a textbox that
I have a TwoWay data-bound textbox inside my page. I want to do something
I would like to have a TextBox that displays a number in currency format
Alright i have a asp.net textbox and i want to set cursor inside textbox
What's the best way to have the following? Name: [Textbox] Inside a div? I

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.