you need to refer to the link by name or id.
either do this:
<a href="blah.html name="link1">Hi Wally!</a>
Then:
alert(docoment.links("link1").href);
or
<a href="blah.html id="link1">Hi Wally!</a>
alert(docoment.all.link1.href));
> -----Original Message-----
> From: Neal Cabage [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 09, 2000 11:36 AM
> To: [EMAIL PROTECTED]
> Subject: Javascript question ...
>
>
> -----Original Message-----
> From: A mailing list about Java Server Pages specification
> and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of Neal Cabage
> Sent: Wednesday, August 09, 2000 11:24 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [JSP-INTEREST] Problems with Cookies...
>
>
> 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
>
> ==============================================================
> =============
> 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
>
===========================================================================
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