Problem with writeJavascript or stringByEvaluatingJavaScriptFromString

77 views
Skip to first unread message

barulho77

unread,
Nov 14, 2011, 11:23:27 AM11/14/11
to phonegap
Friends,

I have the problem below for several days.


//My initial class (MyClass) call other view


-(void)print:(NSMutableArray*)arguments withDict:
(NSMutableDictionary*)options
{


mapViewController = [[MapViewController alloc]
initWithNibName:@"MapView" bundle:nil];
[window addSubview:mapViewController.view];
[window makeKeyAndVisible];
[[super appViewController ]
presentModalViewController:mapViewController animated:YES];

}

//In the same Class I call a javascript

-(void)executeScript {

NSLog(@"I received this message");

[super writeJavascript:@"alert('message')"]; //not work
[super.webView
stringByEvaluatingJavaScriptFromString:@"alert('message')"]; //not
work


}






How to get work executeScript calling from my other view/class
(MapViewController)?


I tried many things like this:


[[[MyClass alloc] init] executeScript];


But only NSLog works.


Can anyone help me?

barulho77

unread,
Nov 14, 2011, 3:38:11 PM11/14/11
to phonegap
Friends,

I have great urgency in solving this problem?

Someone available to PAID SUPPORT now?

Download the sample project at: http://www.rodriguesdesign.com.br/sample.zip

I just need to run javascript.

Thanks in advance.
Reply all
Reply to author
Forward
0 new messages