Well, i tried a few things and dit it that way:

document.theForm.ThecheckBox.parentNode.lastChild.nodeValue =
"thetexte"

thanks anyway

On 19 fév, 15:36, "Jake McGraw" <[EMAIL PROTECTED]> wrote:
> $("label").each(function(){
>   $(this).html($(this).html().replace(/[^>]+$/,"Replacement"));
>
> });
>
> No, tested, should work for your specific example.
>
> - jake
>
> On Feb 19, 2008 7:52 AM, bjousse <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi,
>
> > I am working on a project where the "creative people" use a product
> > which generates HTML like
>
> >  <label for="fchk_menus1" style="position:absolute; top:39px; left:
> > 9px; ">
> >         <input  id="fchk_menus1" type="checkbox" name="fchk_menus1"
> > value="true"
> >                          style="vertical-align:baseline; margin-bottom:
> > 0px"/>
> >         Administration
> > </label>
>
> > As we have standardized all names and ID, everything looks fine.
>
> > I just need to replace the Administration part by something else (we
> > are using Tomcat/Struts) and I don't want developpers to play with teh
> > HTML generated by the "creative people" product.
>
> > So I want to do that in Jacvascript.
>
> > My problem is that I did not find a way to extract Administration and
> > replace it by something else....
>
> > If I do a $("label[for='fchk_menus1']").text("new text") ;
> > the checbox just disappears....
> > any ideas ?
>
> > thanks in advance
>
> > Bernard

Reply via email to