how do i call this code from an html button and pass it parameters
<p>OK I found this code here at stackoverflow It works nice.  But how can I call it in a webview from a button on an html page that also has the event details (date time place)?
<a href="http://stackoverflow.com/questions/246249/programmatically-add-custom-event-in-the-iphone-calendar">Programmatically add custom event in the iPhone Calendar</a></p>

<pre><code>#import "EventTestViewController.h"
#import &lt;EventKit/EventKit.h&gt;

@implementation EventTestViewController

- (void)viewDidLoad {
[super viewDidLoad];

EKEventStore *eventStore = [[EKEventStore alloc] init];

EKEvent *event  = [EKEvent eventWithEventStore:eventStore];
event.title     = @"EVENT TITLE";

event.startDate = [[NSDate alloc] init];
event.endDate   = [[NSDate alloc] initWithTimeInterval:600 sinceDate:event.startDate];

[event setCalendar:[eventStore defaultCalendarForNewEvents]];
NSError *err;
[eventStore saveEvent:event span:EKSpanThisEvent error:&amp;err];       
}



- (void)didReceiveMemoryWarning {
    // Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];

    // Release any cached data, images, etc that aren't in use.
}

- (void)viewDidUnload {
    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
}


- (void)dealloc {
    [super dealloc];
}

@end
</code></pre>
