UIWebView javascript with IOS Issue -
I try to use the iOS call function javascript but still not working me pleasee !!
With this help, javascript
function geturl (getdata) {// document.getElementById ('test1'). Src = ''; Warning (GetData); } and the iOS code
- (bool) webview: (UIWebView *) inWeb shouldStartLoadWithRequest: (NSURLRequest *) inRequest navigationType: (UIWebViewNavigationType) inType { NSURL * URL = [request URL]; NSString * stringURL = [NSString stringWithFormat: @ "% @", URL]; NSString * urlString = inRequest.URL.absoluteString; NSString * getdata = @ "Please come"; NSString * sendBack = [NSString stringWithFormat: @ "geturl ('% @')", getdata]; [SubView StringAvleuating JavascriptFromString: Sendback]; // SubView UIViewview Returns Yes; } I try to use this way, but the data is not alert that what help me please !!
Do not know - (void) webViewDidFinishLoad: (UIWebView *) WebView {if (loadingPage & LT; [Book count]) {NSURL * URL = [NSURL fileURLWithPath: [ [NSBundle mainBundle] pathForResource: [Book objectAtIndex: loadingPage] ofType: @ "html" inDirectory: @ ""]]; [[ScrollView.subviews objectAtIndex: loadingPage] loadRequest: [NSRR request request with url: url]]; [[ScrollView.subviews ObjectOutIndindex: Loading page] Sethead: No]; LoadingPage ++; SubView.scrollView.bounces = No; [[Subview ScrollView] Set Bones: No]; } NSString * getdata = @ "Please come"; NSString * sendBack = [NSString stringWithFormat: @ "geturl ('% @')", getdata]; [Evaluation StringbivyEvaluatingJavaScriptFromString: sendBack]; } I also try but still not working. If I got something wrong then please tell me
Please ensure the subview is UIWebView object, and also you The need to return the steel yes or not in the mustStartLoadWithRequest method and another little solution - the open safari debugger with the simulator or device and manually in the console Check this function from
Comments
Post a Comment