Hi,
> alert($('myinput').previous('div').stiptags());
Actually I think it's previous() you're having a problem with --
that's for siblings, but the div is not a sibling of 'myinput', it's
the parent of it. You want up().
Separately, you're calling stripTags() on an HTMLElement. stripTags()
is a String method. You probably wanted to put an innerHTML in there,
something along these lines (untested):
alert($('myinput').up().innerHTML.stiptags());
(No need for the selector on up() in this case, although you could put
it in.)
HTH,
--
T.J. Crowder
tj / crowder software / com
On Oct 13, 10:47 am, DrBenway <[EMAIL PROTECTED]> wrote:
> I'm a little confussed about striptags.
>
> expl:
> <div>
> <input type='text' name='myinput' /> some text
> </div>
>
> I was hoping that alert($('myinput').previous('div').stiptags());
> would give me the content of the div without the input tag. Yet I get
> undefined.
> My guess is that striptags needs a string and my code doesn't return a
> string.
> Anyone out there who can enlighten me plz?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---