Cool, that looks perfect. Out of interest, will this handle more than 128 characters in a link? It seems to be truncated at that point regardless of the characters when I do a normal link?
Cheers, Tony. -----Original Message----- From: Abdul Qabiz [mailto:[EMAIL PROTECTED] Sent: 02 April 2005 17:31 To: [email protected] Subject: RE: [flexcoders] Javascript open.window in htmlText Hi You can do it, the way its done in html/javascript... _ta.htmlText = "Click <a href='javascript:window.open(\"http://www.macromedia.com\",null,\"height=600 ,width=800,status=yes,toolbar=no,menubar=no,location=no\");void(0);'><font color='#0000FF'><u>here</u></font></a> to open macromedia.com in a popup."; But sometimes, these kind of linking become unmanagable, in that case you can use "asfunction" to call a function flex code which opens popup... Look at the following example, which demomstrates both techniques... ##asfunctionExample.mxml## <?xml version="1.0" encoding="iso-8859-1"?> <mx:Application width="800" height="600" xmlns:mx="http://www.macromedia.com/2003/mxml" creationComplete="appInit()"> <mx:Script> <![CDATA[ function appInit() { _ta.htmlText = "Click <a href='javascript:window.open(\"http://www.macromedia.com\",null,\"height=600 ,width=800,status=yes,toolbar=no,menubar=no,location=no\");void(0);'><font color='#0000FF'><u>here</u></font></a> to open macromedia.com in a popup."; _ta1.htmlText = "Click <a href='asfunction:mx.core.Application.application.openLink,macromedia'><font color='#0000FF'><u>here</u></font></a> to open macromedia.com in a popup."; } function openLink(whichLink) { alert("Which Link:" + whichLink); var url:String; switch(whichLink) { case "macromedia": url = "http://www.macromedia.com"; } getURL('javascript:window.open("' + url + '",null,"height=600,width=800,status=yes,toolbar=no,menubar=no,location=no") ;void(0);'); } ]]> </mx:Script> <mx:Label fontSize="16" text="Usual way"/> <mx:TextArea id="_ta" width="300" height="200"/> <mx:Label fontSize="16" text="Better way using asfunction:"/> <mx:TextArea id="_ta1" width="300" height="200"/> </mx:Application> Couple of links on asfunction: - http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_15639 - http://www.macromedia.com/support/flash/action_scripts/actionscript_dictiona ry/actionscript_dictionary073.html I just remember that someone wrote a very long tutorial on asfunction, recently some 2-3 months back it appeared on some blog...Just don't remember the URL... Anyways, I hope it helps you.... -abdul ________________________________ From: Anthony Merryfield [mailto:[EMAIL PROTECTED] Sent: Saturday, April 02, 2005 8:30 PM To: [email protected] Subject: [flexcoders] Javascript open.window in htmlText Hi everybody, Is there a way to open a popup from a link in htmlText? Cheers, Tony. This communication together with any attachments transmitted with it ("this E-Mail") is intended only for the use of the addressee and may contain information which is privileged and confidential. If the reader of this E-Mail is not the intended recipient or the employee or agent responsible for delivering it to the intended recipient you are hereby notified that any use, dissemination, forwarding, printing or copying of this E-Mail is strictly prohibited. Addressees should check this E-mail for viruses. The Company makes no representations as regards the absence of viruses in this E-Mail. If you have received this E-Mail in error please notify our ISe Response Team immediately by telephone on +44 (0)20 8896 5828 or via e-mail at [EMAIL PROTECTED] Please then immediately delete, erase or otherwise destroy this E-Mail and any copies of it. Any opinions expressed in this E-Mail are those of the author and do not necessarily constitute the views of the Company. Nothing in this E-Mail shall bind the Company in any contract or obligation. For the purposes of this E-Mail "the Company" means The Carphone Warehouse Group Plc and/or any of its subsidiaries. Please feel free to visit our website: http:// www.carphonewarehouse.com or http://www.phonehouse.com The Carphone Warehouse Group Plc (Registered in England No. 3253714) 1 Portal Way, London W3 6RS ________________________________ Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> * Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service <http://docs.yahoo.com/info/terms/> . Yahoo! Groups Links This communication together with any attachments transmitted with it ("this E-Mail") is intended only for the use of the addressee and may contain information which is privileged and confidential. If the reader of this E-Mail is not the intended recipient or the employee or agent responsible for delivering it to the intended recipient you are hereby notified that any use, dissemination, forwarding, printing or copying of this E-Mail is strictly prohibited. Addressees should check this E-mail for viruses. The Company makes no representations as regards the absence of viruses in this E-Mail. If you have received this E-Mail in error please notify our ISe Response Team immediately by telephone on +44 (0)20 8896 5828 or via e-mail at [EMAIL PROTECTED] Please then immediately delete, erase or otherwise destroy this E-Mail and any copies of it. Any opinions expressed in this E-Mail are those of the author and do not necessarily constitute the views of the Company. Nothing in this E-Mail shall bind the Company in any contract or obligation. For the purposes of this E-Mail "the Company" means The Carphone Warehouse Group Plc and/or any of its subsidiaries. Please feel free to visit our website: http:// www.carphonewarehouse.com or http://www.phonehouse.com The Carphone Warehouse Group Plc (Registered in England No. 3253714) 1 Portal Way, London W3 6RS Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

