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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T19:27:03+00:00 2026-06-02T19:27:03+00:00

I have a WebView which loads content from the Internet. If I have a

  • 0

I have a WebView which loads content from the Internet.
If I have a link which uses the ‘_blank’ attribute, nothing happens.

So far I have tried setting my WebView delegate but I can’t get it to register, I can’t even get an NSLog back so I must be using it wrong. The code is as follows:

- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
    [tmpView setUIDelegate:self];
}

- (WebView *)webView:(WebView *)sender createWebViewWithRequest:(NSURLRequest *)request
{
    NSLog(@"HEY THERE");
    return sender;
}

Ideally what I’d like, is that whenever a link is clicked on a WebView, the link is always opened within that WebView, nowhere else.

Is this possible?

Through research I found other methods but have no idea how to use them to get the result I desire:

webView:decidePolicyForNewWindowAction:request:newFrameName:decisionListener:

I’m completely stumped so I’d really appreciate your help.

Thanks in advance everyone.

  • 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-02T19:27:05+00:00Added an answer on June 2, 2026 at 7:27 pm

    If you don’t want to open a new window but just open the request in your current WebView object, you just need to do this in your delegate:

    - (WebView *)webView:(WebView *)sender createWebViewWithRequest:(NSURLRequest *)request
    {
        [[sender mainFrame] loadRequest:request];
        return sender;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code which loads and html file into a webview -
I have a Android Application which is basically uses WebView for all interaction.. How
I have a WebView and the it loads a html page which has javascript
I have a URL link which I am displaying in WebView. Now, when this
I have WebView which loads some page, when it's finished I apply some javascript
I have a simple webview which loads a page. This page has a few
I have a WebView on my Android application which loads ( WebView.loadUrl() ) different
I have an webView in a Cocoa application which I edit the contents programatically.
I have a webview, which shows the pages of a ebook. I want to
I have a webview that I'm creating in an Activity which is a child

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.