Ah, thank you!  Not sure what I was thinking.

On Apr 9, 3:04 pm, mkmanning <michaell...@gmail.com> wrote:
> Try alert( typeof(link_path) ) and you'll see it's a function. Try
> link_path.toString() and then split it.
>
> On Apr 9, 2:54 pm, Nic Hubbard <nnhubb...@gmail.com> wrote:
>
> > I am getting the attribute of an image on a page.  It is the onclick
> > attribute, but I need some text from the onclick function. (Sounds
> > strange, but I do).  Using the following works totally fine:
>
> > var link_path = $(html).find("img[alt='Show in Asset Map']").attr
> > ('onclick');
> > alert(link_path);
>
> > From that, I can gather the onclick attribute.  But, I would like to
> > use .split() to section it up, but I keep getting a warning ($
> > (html).find("img[alt='Show in Asset Map']").attr("onclick").split is
> > not a function) when I try to use split with this.  Even Breaking it
> > down and trying link_path.split('a'); does not work and gives the
> > error.
>
> > Why would this be?

Reply via email to