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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T13:44:09+00:00 2026-06-09T13:44:09+00:00

I have a UIWebView page with multiple button . Need to identify which button

  • 0

I have a UIWebView page with multiple button . Need to identify which button is clicked of the UIWebView.

Page source for UIWebview load contents:

        <form action="settings_personal.php" data-ajax="false" method="post">   
            <input type="submit" name ="btn_settings_personal" value=" Goals (Personal data) " data-icon="star" data-theme="g" />
        </form> 

        <form action="settings_global.php" data-ajax="false" method="post"> 
            <input type="submit" name ="btn_settings_global" value=" Settings " data-icon="gear" data-theme="g" />
        </form>
        <form action="" data-ajax="false" method="post">    
            <input type="submit" name ="btn_web_access" value=" Web Plattform Access " data-icon="plus" data-theme="h" />
        </form>     

I need to identify button clicked for ‘btn_web_access’ named button ???

I have implemented following :

- (BOOL)webView:(UIWebView*)webView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType{

 NSString* clicked = [self.webView stringByEvaluatingJavaScriptFromString:@"document.getElementById('btn_web_access').click();"];

    NSLog(@"CLICK %@",clicked);

}

but its of no use..Thanks in advance.

  • 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-09T13:44:10+00:00Added an answer on June 9, 2026 at 1:44 pm

    Just use the request’s URL attribute to distinguish the load request’s target:

    - (BOOL)webView:(UIWebView*)webView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType{
    
        NSLog(@"url: %@", [[request URL] absoluteString]);
    
        return YES;
    
    }
    

    Based on the URL being called, you know which button (or even any link) of your currently shown webpage was clicked. Then take the action being needed and don’t forget to return a BOOL value indicating wether or not to actually load the requested URL.

    In Swift you might have

    func webView(webView:UIWebView,
              shouldStartLoadWithRequest request:NSURLRequest,
              navigationType:UIWebViewNavigationType) -> Bool
        {
        if (navigationType == .FormSubmitted)
            {
            print("was the 'submit' form")
            }
    
        let u = request.mainDocumentURL
        print("local or remote url was " ,u)
    
        return true // allow the form to in fact send the form
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If you have a UIWebView, and load a web page with a form on
i have a uitableview which will load a uiwebview with a long page (static
i'm creating an app in which i have a uiwebview. I want to load
I have a UIWebView which loads an HTML page which has some links to
I have a UIwebview which loads up a page ,first the links in the
I have used UIWebview to load a web page using loadRequest: method, when I
I have an app with UIWebView which loads a remote HTML page...Now on this
I have a UIWebView that I'd like to load a web page and also
I have a uiwebview that sends its loaded page url to a uitableview to
I have a UIWebView in my iPhone app that have a web page with

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.