I am loading a jqueryMobile html file into webview and webViewDidFinishLoad event is properly triggered. However, when you select a navigation button of loaded jqMb file that loads another html file content, event is not fired! how to capture it? Thank you
Asked
Active
Viewed 719 times
2
-
You can use JavaScript events that jQuery Mobile exposes: http://jquerymobile.com/demos/1.1.0/docs/api/events.html. See `pageinit`, it's the `document.ready` for jQuery Mobile. – Jasper May 03 '12 at 18:16
-
I can capture event properly on jqueryMobile when button is pressed! but how to fire then native webview event? shouldStartLoadWithRequest – Jaume May 04 '12 at 09:22
-
solved using fake javascript call, widow.location = "localFuction". Then - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest is triggered ad if if ([[[request URL] absoluteString] hasPrefix:@"localFunction"]) { Return NO; Hope this helps – Jaume May 04 '12 at 17:45
-
You should post that as an answer so people who stumble across this page know you fixed it. – Jasper May 04 '12 at 21:04
1 Answers
1
solved using fake javascript call, widow.location = "localFuction"
.
Then, - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest
is triggered and if ([[[request URL] absoluteString] hasPrefix:@"localFunction"]) { Return NO
;
Hope this helps

Jaume
- 3,672
- 19
- 60
- 119
-
I know this is an old post, but where/how are you calling the `window.location = "localFunction"` ? – adamdehaven Jul 24 '12 at 13:13