Fetch Text from UIWebView
===

I am new to iPhone developer,

I am loading a webpage in my UIWebview,

After loading is done when user selects any text then i want to fetch that text,

here is my code snippet,

        CGRect webFrame = CGRectMake(0.0, 0.0, 500.0, 500.0);

        UIWebView *webView = [[UIWebView alloc] initWithFrame:webFrame];
        NSString *urlAddress = @"http://stackoverflow.com/";
        NSURL *url = [NSURL URLWithString:urlAddress];
        NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
        [webView loadRequest:requestObj];
        [self.view addSubview:webView]; 
        
        NSString *t= [webView stringByEvaluatingJavaScriptFromString:@"document.documentElement.innerText;"];
        NSLog(@"selected text=%@",t);
        
        [webView release];

but my Log shows nothing when i selects any text.

**Any help will be appreciated.**