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 6122987
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:57:47+00:00 2026-05-23T15:57:47+00:00

I am trying to get values from a table that lives inside an iframe

  • 0

I am trying to get values from a table that lives inside an iframe using jquery but so far with no luck.

i have tried this code:

$('#childframe').contents().bind("dblclick", function() {
var code = $('#childframe').contents().find('.priceName').text();
alert(code);
return false; }):

but i am getting the text of the entire td for that column. because i am using gridview sap.net control i can’t set the ID for that td and I am forced to define the CssClass to “priceName”.

“childframe” is the ID for my iframe.

  • 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-23T15:57:47+00:00Added an answer on May 23, 2026 at 3:57 pm

    This should get you the text for the element that is double clicked:

    $('#childframe').contents().bind("dblclick", function() {
        alert($(this).text());
    });
    

    Here’s a working example: http://jsfiddle.net/K9P9q/30/

    EDIT

    If you’re having a difficult time getting this to work, here’s another suggestion (this assumes that you control that page being loaded in the iframe).

    1. Do your click binding in the iframe itself. This should simplify the jquery binding code.
    2. In your click handler function within the iframe, invoke a function on the parent and pass the text of the selected TD to the parent. Example below.

    jQuery inside iframe

    $('#[tableIdHere]').bind("dblclick", function() {
        parent.HandleTdDoubleClick($(this).text());
    });
    

    Hander inside parent

    function HandleTdDoubleClick(txt)
    {
        alert(txt);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying get values from a GridView using the following code: foreach (GridViewRow row
I have several pages that access my data-base directly and get values from a
I'm trying to get all property names / values from an Outlook item. I
I'm trying to get a query working that takes the values (sometimes just the
I have a tricky situation in trying to get information from multiple queries into
I am trying to get a list of product id's that do not have
I'm trying to take values from a table and put them into a string
I have a mysql database that I'm trying to populate from a text file.
I am trying to get some values from a List and then create a
I'm trying to get column names from a table. I want to supply the

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.