• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Retrieving Multiple Anchor Tags.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Retrieving Multiple Anchor Tags.


  • Subject: Retrieving Multiple Anchor Tags.
  • From: Philip Juel Borges <email@hidden>
  • Date: Thu, 14 May 2009 16:50:22 +0200

Hi,

The code below retrieves an anchor tag name '25' from the '1.html' document when I type '25' in my NSTextField, and loads it in WebView.
But the '1.html' document contains many numerical anchor tags. Does anybody know how I can retrieve any anchor tag I type in NSTextField and load it in WebView?


- (void)gotoAnchor:(NSString *)name {

NSString *path = [[NSBundle mainBundle] pathForResource:@"1" ofType:@"html"];
NSURL *baseURL = [NSURL fileURLWithPath:path];
NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"%@#%@",[baseURL absoluteString], name]];

NSURLRequest *req = [NSURLRequest requestWithURL:url];

[[webView mainFrame] loadRequest:req];
}


- (IBAction)gotoAnchorTag25:(id)sender
{
	[self gotoAnchor:@"25"];

}

/Philip

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Retrieving Multiple Anchor Tags.
      • From: Kyle Sluder <email@hidden>
  • Prev by Date: Re: Fetch Requests on Non Standard Classes in Core Data
  • Next by Date: Re: Retrieving Multiple Anchor Tags.
  • Previous by thread: Re: Using an arraycontroller for different object classes
  • Next by thread: Re: Retrieving Multiple Anchor Tags.
  • Index(es):
    • Date
    • Thread