URL searching in iPhone program
<p>I am a new iPhone programmer.</p>

<p>I am making a web based application.  I'm taking the user input of a URL to a text box.  When the button is pressed they will go to the web address.</p>

<p>Now when user type the URL such as <a href="http://www.google.com" rel="nofollow">http://www.google.com</a>, then it works fine
The problem is that when user only types google.com or www.google.com it doesn't work.</p>

<p>I don't understand how to fix this.</p>

<p>If I add 'http://'  problematically, I still have a problem because if the user writes the whole web address it will fail.</p>

<p>Here is my code for button click:</p>

<p>-(IBAction)go
{
    NSMutableString *str;</p>

<pre><code>    str = [NSMutableString stringWithFormat:@"http://www.%@",name.text];    
    [webview loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:str]]];
</code></pre>

<p>}</p>

<p>Here name is a textfield and webView is an object of webView.  Other than the web address behavior, it works fine.</p>

<p>Please help....</p>
