objective c - Problem opening a page in different UIWebViews using Javascript -


I'm with the majority of the functionality being a web application, an iPad app. UI has only three UIWebViews which load pages. Every clicked link has been paused, and I have a request variable in the URL named "iPadTarget."

Ex:

The above code is the second open webview because iPadTarget = 2. (UIWebView *) WebView shouldStartLoadWithRequest: (NSURLRequest *) request navigationType: (UIWebViewNavigationType) navigationType {- (bool) WebView

 :  

The code that caters NSURL * Url = [request URL]; // Remove the value from the 'iPad tabs' request variable in the URL string. NSString * test = [url query]; Int Index = [Test Rangeoffestring: @ "iPad Target ="] place; Int target = index + 11; Four c = [test character atindex: target]; NSLog (@ "% c", c); If (navigationType == UIWebViewNavigationTypeLinkClicked || navigationType == UIWebViewNavigationTypeFormSubmitted || navigationType == UIWebViewNavigationTypeOther) {if (c == '1') {[viewOne loadRequest: Request]; no return; } And if (C == '2') {[view2 loader request: request]; no return; } And if (C == '3') {[see Third Load Request: Request]; no return; }} Yes return; }

My problem is this: I have a form with an onclick event of a button:

  & lt; Button = 'window.open onclick ("someotherpage.asp ipadTarget = 2"); Window.open ("someotherpage.asp ipadTarget = 3"); '& Gt; Button & lt; / Button & gt;  

This code should open the same page in both the second and third UIWebView. However, this is nothing and when I look at the console output, it prints four bounds infinitely

Sorry for the long question, I would appreciate any help!

Are you sure that this is only the first UIWebView delegate?

Whatever you do, include some more verbose logging.

  NSLog (@ "webview% x, url =% @", request for ... ...);  

and

  NSLog (@ "is not returning because ...");  

To know the reason for the loop.


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -