I'm doing a hack and the link is showing up in the title attribute. Here is my code which only removes the "</a>", but I need to remove the opening href as well. //Remove Title titleLinks=$$('div.ms-acal-item');
for (var i = 0; i < titleLinks.length; i++) { var element = $(titleLinks[i]); if (element.hasAttribute('title')) { var tempTitle = element.readAttribute('title'); tempTitle = tempTitle.gsub('</a>',''); element.setAttribute('title', tempTitle); } else { element.setAttribute('title', ''); } } On Mar 8, 1:03 pm, blechler <lech...@gmail.com> wrote: > Hi Lallo, > > I'm not sure that I entirely understand what you are attempting to > accomplish and how removing the title attribute is working for you. > When I go to the provided page and attempt to inspect it, I see a lot > of title attributes being rapidly added and removed from the div > containing the calendar item. > > Nevertheless, let's say you have the following: > > <div class="ms-acal-item" id="foo"> > <div class="ms-acal-sdiv"> > 7:00 pm <a href="/Communications/Events/Pages/eventdisplay.aspx? > EventID=2262">​Mayan Elder</a> > </div> > </div> > > the following script will do what I think you want to accomplish: > > <script> > function removeThatAnchor() { > var innerDiv = $('foo').select('.ms-acal-sdiv')[0]; > var aToRemove = innerDiv.select('a')[0]; > var aText = aToRemove.innerHTML; > aToRemove.remove(); > innerDiv.update(innerDiv.innerHTML + " " + aText);} > > </script> > > Bernard > > On Mar 7, 12:06 pm, lalov1 <lallo.vi...@gmail.com> wrote: > > > > > > > > > Hello all, > > > I'm new to prototype and am trying to achieve the following. I have > > the following title text "1:00 pm - 2:00 pm <a > > href="http://www.google.com">Link Goes Here</a>" > > > I want to delete the "<a href="http://www.google.com">" and the "</ > > a>". > > > What is the best way to do this. Right now I'm using the > > removeAttribute('title'); which works, but not like I want it to. Here > > is a link to our > > page:http://www.colostate-pueblo.edu/Communications/Events/Pages/default.aspx > > > Thank you, > > Lallo -- 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 prototype-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.