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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T12:07:33+00:00 2026-06-09T12:07:33+00:00

I already used document.getElementById, but it does not work any more. I want to

  • 0

I already used document.getElementById, but it does not work any more. I want to get the value of 0,01€ but I can not. I want to save it in my NSString *price but how.
The HTML code is

<tr class="price">
<td>0,01</td>
<td>EUR</td>

My idea was

NSString *price = [webView stringByEvaluatingJavaScriptFromString:@"document.getElementsByTagName('price.td').innerText;"];
  • 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-09T12:07:34+00:00Added an answer on June 9, 2026 at 12:07 pm

    The tagName in this case is ‘td’ not ‘price.td’, but if you run document.getElementsByTagName('id') you will get all the table cells in the page which is probably not what you want.

    If the page has jQuery loaded in it you can use jQuery('.price td:first').text() to get the price.

    If it doesn’t have jQuery but you have control of the page you can add a class to it (<td class="my-price">12.44</td>) and get it with document.getElementsByClassName('my-price')[0].innerHTML.

    If you don’t have control of the page and it doesn’t have jQuery you will have to find the ‘price’ row and then get its 1-st cell by using document.getElementsByClassName('my-price')[0].childNodes[0].innerHTML.

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

Sidebar

Related Questions

sending mail along with embedded image using asp.net I have already used following but
I used to configure boost already, but this time I have no idea what
Already finished implementing the player. I want to implement the progress bar. But I
Is it possible to match 'Any node not already matched/handled'? Preferably without making my
So, I essentially have what I want already, very simple, but there are some
I am not very used to using javascript but I have gotten sick of
I'm already using scrollTo, but that can be scrapped or replaced by something else
May be some body already used some open source component, writing on jquery. And
We already have the database with real data inside. Now we want to build
I have images on my page. User can add more images onto the page

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.