Help With My App


#1

Hey all. I have something I need some help with. I’m designing an app for a school, but I don’t have much experience with UIWebViews, JavaScript, or HTML. Could you help me with the following problems?

1.) I can get the accessibility of my Forward/Back buttons to work. Here’s what the code looks like:

In my WebViewController.h file:

@interface WebViewController : UIViewController{ IBOutlet UIBarButtonItem *backButton; IBOutlet UIBarButtonItem *forwardButton; } @property (strong, nonatomic) IBOutlet UIWebView *webview;

And in the .m file:

- (void)webViewDidFinishLoad:(UIWebView *)webView { backButton.enabled = [webView canGoBack]; forwardButton.enabled = [webView canGoForward]; }

2.) I need to load the data in the container content_well_div_ from this website: http://www.rschooltoday.com/se3bin/clientgenie.cgi?schoolname=school1&statusFlag=goGenie&geniesite=1145&myButton=g5plugin&db=g1145_b16145. Here’s what the code looks like. I know it’s a mess. Again, I don’t use WebViews, JS, or HTML much.

[code]- (void)viewDidLoad
{
[super viewDidLoad];

NSString *website = @"http://www.rschooltoday.com/se3bin/clientgenie.cgi?schoolname=school1&statusFlag=goGenie&geniesite=1145&myButton=g5plugin&db=g1145_b16145";
NSURL *url = [NSURL URLWithString:website];
NSURLRequest *requestUrl = [NSURLRequest requestWithURL:url];
[webview loadRequest:requestUrl];
NSString *html = [webview stringByEvaluatingJavaScriptFromString:@"webview.getElementById(content_well_div_)"];
[webview loadHTMLString:html baseURL:nil];

}[/code]

Thanks in advance for helping me with my first endeavor with UIWebView!