• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Accessing javaScript in iframes via Objective-C
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Accessing javaScript in iframes via Objective-C


  • Subject: Re: Accessing javaScript in iframes via Objective-C
  • From: Andrew Farmer <email@hidden>
  • Date: Mon, 30 Jul 2007 17:16:55 -0700

On 30 Jul 07, at 17:08, Dale Jensen wrote:
I'm running into an issue.  Given this code:

	id win = [[theController webView] windowScriptObject];
	[win evaluateWebScript: @"sampleCall();"];

it works fine if "sampleCall();" is on the base HTML page. If I put the javascript function "sampleCall" in an iFrame, however, it doesn't work (never gets called.) Seems like the webView only holds base level js functions, but fiddling with line #1 to try and get something out of a WebFrame object didn't work.

Is it possible to make a call to javascript that's in an iframe? If so, what do I need to change in my code?

My first guess would be that you'll have to dig through the DOM structure, find the iframe object, get its associated WebFrame, and work with that.


If that is unclear or doesn't work, I'd recommend asking on one of the WebKit lists (webcore-dev and webkitsdk-dev look most promising). They're more likely to have an answer.
_______________________________________________


Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Accessing javaScript in iframes via Objective-C
      • From: Dale Jensen <email@hidden>
References: 
 >Accessing javaScript in iframes via Objective-C (From: Dale Jensen <email@hidden>)

  • Prev by Date: Accessing javaScript in iframes via Objective-C
  • Next by Date: Re: Accessing javaScript in iframes via Objective-C
  • Previous by thread: Accessing javaScript in iframes via Objective-C
  • Next by thread: Re: Accessing javaScript in iframes via Objective-C
  • Index(es):
    • Date
    • Thread