Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Accessing javaScript in iframes via Objective-C



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?

Thanks!


dale

--
a.d. jensen -- email@hidden   http://homepage.mac.com/adjensen/

musical blog:                                   dining blog:
   http://kandsmil.blogspot.com       http://gcdining.blogspot.com



Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.