Assuming Highlander TextField:

function init()
{
 my_txt.htmlText = "Hello <a href='http://www.jessewarden.com'>Jesse</a>, 
how are you?";

 var str = my_txt.htmlText;

 var start = str.indexOf("<a href");
 if(start == -1)
 {
  start = str.indexOf("<A HREF");
 }
 var startBracket = str.indexOf(">", start);
 var endBracket = str.indexOf("</a>", startBracket);
 if(endBracket == -1)
 {
  endBracket = str.indexOf("</A>", startBracket);
 }
 var linkText = str.substring(startBracket + 1, endBracket);
 trace("linkText: " + linkText);
}

init();


----- Original Message ----- 
From: "Jason Lutes" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, April 13, 2006 2:31 PM
Subject: [Flashcoders] Retrieving Link Text in a Text Field


Is there a way to identify the contents of a link element in an
HTML-enabled text field? How can I pass the text of the link to a function
invoked by the link?


-
Jason

_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com 

_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to