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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T04:20:26+00:00 2026-05-31T04:20:26+00:00

I am showing a web page using html string in a UIWebview. I want

  • 0

I am showing a web page using html string in a UIWebview. I want to retrieve the value typed from the below text area code.

result = [result stringByAppendingFormat:@"<textarea name=\"qId_"];
    NSString *questionid = [question valueForKey:@"QuestionId"];
    NSString *questionidSTR = (NSString *) [NSString stringWithFormat:@"%@", questionid];
    result = [result stringByAppendingFormat:questionidSTR];
    [questionidArray addObject:questionidSTR];
    result = [result stringByAppendingFormat:@"\" rows=\"5\" style=\"width:90%\"></textarea>"];

I tried

NSString  *value = [NSString stringWithFormat:@"%@%@%@",@"document.getElementById('",[questionidArray objectAtIndex:i],@"').value"];

   NSString* out = [enterSurveyWebview stringByEvaluatingJavaScriptFromString:value];

But, its not giving the correct output, i think i’m doing wrong when retrieving the value.

Could someone please correct me for retrieving portion?

Thank you.

  • 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-31T04:20:28+00:00Added an answer on May 31, 2026 at 4:20 am

    Your <textarea> has a name of qId_%@ (where %@ is the QuestionId), but your javascript is only asking for %@. You also need to be using getElementByName() instead of getElementById().

    NSString *value = [NSString stringWithFormat:@"document.getElementsByName('qId_%@')[0].value", [questionidArray objectAtIndex:i]];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the web view for showing html pages, and I want to
Using ASP.Net & C# I want to run my web page in the internet
I am working with a web page, and showing it in a html editor.
I want to execute javascript code from my iPhone application using UIWebView. But only
I am trying to update a small area in my web page.I just want
I added this code to my web page: <input id='argh' type='text' onfocus='this.value=7'> Unless the
A web page of a web application was showing a strange error. I regressively
When showing data from a mysql table on an php page does it have
Currently I'm using PHP to load multiple XML files from around the web (non-local)
I am working on an iPhone Web App using HTML & CSS. I have

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.