Neal,
I tried this snippet using the innerText feature of dynamic HTML on one of
my pages and it seemed to do what you wanted.
Hope this helps you.
Chris
...
<p><a href="foodItem.htm" onclick="showtext(this);">XML Food Item</a></p>
...
<script language="Javascript">
function showtext(this_obj){
alert("the text is " + this_obj.innerText);
}
</script>
> -----Original Message-----
>
> Does anyone know hoe to return the text of an html (HREF) link to
> javaScript? I am trying to find a way around MSIE's pathetic
> implementation of XML.
>
> Bascially, I need to be able to create a link. On the page the link would
> say .. for instance "hi wally". Then, I want to be able to popUp a
> JavaScript alert box that would print the text of the link: "hi wally".
> This would be a proof of the ability to extract the link text.
>
> Would anyone know how to do this? Otherwise, I have to scrap XML and do
> it
> all with HTML. :(
>
>
> Thanks!
>
> Neal
>
>
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets