|Dec 11, 2008, 04:32 AM||#1|
Problem in accessing content of a web by passing variable
I need to display a content of a website by passing a value.
my link is
here i want to pass a code as a variable.(because code value is 100,101,102).According to the value the content will be changed.
[HTML]So i get a value of code in a textfield and store it in a variable called code.
//To concatenate url with "code"
NSString *urlContents = [NSString stringWithFormat:
//To display Contents
*NSString *urlContents1 = [NSString stringWithContentsOfURL:
[[NSURL alloc] initWithString:urlContents]];
I use a textview to display a content, so ,
But i cannot get result.
Can anybody please give me the code.
|Dec 11, 2008, 06:27 AM||#2|
You need to provide more information about what's "not working". What have you tried so far to debug this?
Also don't use xxx.com as an example domain, it redirects to porn. http://www.example.com is reserved for the purpose of examples, use that.
|Dec 11, 2008, 11:15 AM||#3|
On first pass, I see a problem with your urlContents string creation.
NSString *urlContents = [NSString stringWithFormat: @"http://www.xxx.com/xxx.aspx?country=? %@",code ];
Try this instead:
NSString *urlContents = [NSString stringWithFormat: @"http://www.xxx.com/xxx.aspx?country=%@", code ];
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|Framerate problem with XSplit, League of Legends, & BOOTCAMP on 2011 Macbook Pro||superkrups20056||Mac and PC Games||0||Oct 11, 2011 07:42 PM|
|List the content of a web folder in iOS||gameplayerxp||iPhone/iPad Programming||3||Jun 17, 2011 10:48 AM|
|Problem in the size of the view of ipad||Binju||iPhone/iPad Programming||14||Apr 20, 2010 10:44 AM|
|Language display problem in "Kind" field of Finder (in List View)||macuser84||Mac Applications and Mac App Store||0||Jul 16, 2009 04:32 PM|
|Problem in accessing value of variable of a parent class||iphonejudy||iPhone/iPad Programming||8||Mar 1, 2009 10:06 AM|
All times are GMT -5. The time now is 01:38 PM.