views:

58

answers:

2

There is 1 button on a view screen, when the user clicks the button a httprequest is sent to http://domain.com/buttoninput.php?id=1

Thats it! Nothing is loaded on the screen! the page is only loaded in the background.

+1  A: 

You probably (at least you should) load the data asynchronously. Upon finishing (your delegate methods are your best friends) evaluate the data your received and change your UI elements. Why would you expect anything to update automatically?

Eiko
how do you actually do it? (new at this)...
K001
A: 

Try this // URL string encoding

NSString *escapedUrl = [aURL stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];

// create the request

NSURLRequest *aRequest=[NSURLRequest requestWithURL:[NSURL URLWithString:escapedUrl] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:60.0];

// create the connection with the request // and start loading the data

NSURLConnection *aConnection=[[NSURLConnection alloc] initWithRequest:aRequest delegate:self];

Sat