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

  • Home
  • SEARCH
  • 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 8044807
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T05:20:39+00:00 2026-06-05T05:20:39+00:00

[scriptObject evaluateWebScript:@mouseClickCallBack = function() { SampleWebViewApp. mouseClickCallBack(); } ]; I have a WebView and

  • 0
[scriptObject evaluateWebScript:@"mouseClickCallBack =  function() { SampleWebViewApp. mouseClickCallBack(); } "];

I have a WebView and I am able to capture the mouseEvents using JavaScript. Now I want to insert textarea at the mouse clicked position,for that I have to add the textarea, I would like to add it in the Objective C.How would I notify the events from JavaScript to Objective C.This is for MAC OSX (cocoa) not for iPhone. What delegates of the webview should I use to accomplish this?

Please suggest any alternative to accomplish the same ?

I have gone through this link.

How to call Objective-C from Javascript?
But it is for UIWebView

I implemented the following API of WebView

+ (BOOL)isSelectorExcludedFromWebScript:(SEL)selector
{
    if ((selector == @selector(mouseClickCallBack)) 
    {
        return NO;
    }
    return YES;
}

But I am not sure where should I call the following code for mouseClick.

WebScriptObject *scriptObject;
   [scriptObject evaluateWebScript:@"mouseClickCallBack =  function() { SampleWebViewApp.mouseClickCallBack(); } "];
  • 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-05T05:20:42+00:00Added an answer on June 5, 2026 at 5:20 am

    I am able to solve this issue using alerts in JavaScript and these alerts are handled in WebView UIDelegate.

    - (void)webView:(WebView *)sender runJavaScriptAlertPanelWithMessage:(NSString *)message initiatedByFrame:(WebFrame *)frame
    

    Please refer the following link.

    JavaScript alert() not working in embedded WebView

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

Sidebar

Related Questions

I'm evaluating the JavaScript/Silverlight interop capabilities and have been able to create a Silverlight
I have this: (function ($) { var myObj = { callMe: function (msg) {
I'm working on a google maps loader (using the google maps javascript API). I
I have a the following java script object function eventTypeObj() { allEventTypes = [];
I have a webpage which lags while loading, because an embedded object is trying
I've recently been toying with data migration into Microsoft Dynamics CRM using MS SQL
I'm writing an application in Python that is going to have a lot of
I have a Silverlight application that generates a lot of Google Maps objects on
I have a WPF app. I need to embed a Silverlight app inside it.
So I have simple applescript that returns (return test) the following: NSAppleEventDescriptor: 'utxt'(test) I

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.