|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|
|Accessing Military Web Mail on Mac Pro Lion||funderchicken||Mac Basics and Help||3||Jan 12, 2014 07:16 AM|
|Safari Web Content quit unexpectedly - Parental Controls problem with Google Docs||Mal||OS X||6||Aug 30, 2013 09:33 AM|
|Apple Applies for Patent on 'Audio Hyperlinking' to Facilitate Accessing Supplementary Podcast Content||MacRumors||MacRumors.com News Discussion||49||Aug 9, 2013 02:03 AM|
|Accessing a static variable from an instance method||nerak99||iPhone/iPad Programming||25||Sep 13, 2012 12:26 PM|
|Resolved: protect the files and to decide is accessing their content||dreamaker||Mac Applications and Mac App Store||0||Sep 13, 2012 08:23 AM|
All times are GMT -5. The time now is 06:44 PM.