Re: [Flashcoders] asfunction and single param
If you're using firefox, trying to get around the popup blocker is a whole world of pain. Alias On 19/06/07, Raphael Villas [EMAIL PROTECTED] wrote: Hi everyone, I'm generating a hyperlink within a textarea component. I'd like to do a getURL by generating HTML that includes the hyperlink, opening up the page in a new window. So far, I have managed to generate the link and open up the page, but not in a new window. It would be great to use an asfunction call to a method that uses getURL with a _blank parameter, but it doesn't seem to be working for me. Any help is appreciated. If there's a better way to do this, do let me know. Here's my code: /** * This works **/ switch ( tNode ) { case web : var tURL:String = dealerNode.childNodes[y].childNodes [0].nodeValue.trim(); //This picks up the url var webURL:String = Website: font color='#ff'ua href='asfunction:openInBrowser,http://; + tURL + '; theOutput += webURL; break; } // Another switch statement closes the font and hyperlink tags /** * Here's my altered code... Since I can only pass in one parameter, I'm defining a function to open the link in a new window, but it doesn't work **/ switch ( tNode ) { case web : var tURL:String = dealerNode.childNodes[y].childNodes [0].nodeValue.trim(); //This picks up the url var webURL:String = Website: font color='#ff'ua href='asfunction:openInBrowser,http://; + tURL + '; theOutput += webURL; break; } function openInBrowser(url){ getURL(url); trace(url); //This doesn't work either }; ___ Flashcoders@chattyfig.figleaf.com 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 ___ Flashcoders@chattyfig.figleaf.com 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
RE: [Flashcoders] asfunction and single param
Are you assembling a string like this: A HREF=http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_14157; TARGET=_blank or maybe this: A HREF=asfunction:myFunction,myParam TARGET=_blank ? If you use HTML text, getURL() is not necessary. If you want to use getURL afterall, then this should work: A HREF=asfunction:openInBrowser,myURLMy Text/A function openInBrowser(url) { getURL(url, _blank); } But I don't see why the latter option would be necessary. Jason Merrill Bank of America GTO Learning Leadership Development eTools Multimedia Team ___ Flashcoders@chattyfig.figleaf.com 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
Re: [Flashcoders] asfunction and single param
try escaping the url being passed as the param. Having two protocols (asfunction: and http:) is probably the cause of your problem. You'll want to unescape it from within the function as well. I think using the target attribute as Jason mentioned is a better solution. On 6/19/07, Raphael Villas [EMAIL PROTECTED] wrote: Hi everyone, I'm generating a hyperlink within a textarea component. I'd like to do a getURL by generating HTML that includes the hyperlink, opening up the page in a new window. So far, I have managed to generate the link and open up the page, but not in a new window. It would be great to use an asfunction call to a method that uses getURL with a _blank parameter, but it doesn't seem to be working for me. Any help is appreciated. If there's a better way to do this, do let me know. Here's my code: /** * This works **/ switch ( tNode ) { case web : var tURL:String = dealerNode.childNodes[y].childNodes [0].nodeValue.trim(); //This picks up the url var webURL:String = Website: font color='#ff'ua href='asfunction:openInBrowser,http://; + tURL + '; theOutput += webURL; break; } // Another switch statement closes the font and hyperlink tags /** * Here's my altered code... Since I can only pass in one parameter, I'm defining a function to open the link in a new window, but it doesn't work **/ switch ( tNode ) { case web : var tURL:String = dealerNode.childNodes[y].childNodes [0].nodeValue.trim(); //This picks up the url var webURL:String = Website: font color='#ff'ua href='asfunction:openInBrowser,http://; + tURL + '; theOutput += webURL; break; } function openInBrowser(url){ getURL(url); trace(url); //This doesn't work either }; ___ Flashcoders@chattyfig.figleaf.com 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 ___ Flashcoders@chattyfig.figleaf.com 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
Re: [Flashcoders] asfunction and single param
Here is a trace from using the first strategy: == Website: font color='#ff'ua href='asfunction:getURL,http:// www. google.com' TARGET='_blank'www. google.com/a/u/font == The url still opens up in the same window as the Flash file, not a new window. The second strategy still doesn't work for me. It doesn't seem to be finding the function. Here's the trace: === Website: font color='#ff'ua href='asfunction:openInBrowser,http://www.google.com'www.google.com/ a/u/font === I've tried to remove the param and see if it can fire 'openInBrowser' with a simple trace, but it doesn't fire. Thanks for the feedback so far. Let me know if there are any other thoughts on this. :) On Jun 19, 2007, at 12:56 PM, Merrill, Jason wrote: Are you assembling a string like this: A HREF=http://www.adobe.com/cfusion/knowledgebase/index.cfm? id=tn_14157 TARGET=_blank or maybe this: A HREF=asfunction:myFunction,myParam TARGET=_blank ? If you use HTML text, getURL() is not necessary. If you want to use getURL afterall, then this should work: A HREF=asfunction:openInBrowser,myURLMy Text/A function openInBrowser(url) { getURL(url, _blank); } But I don't see why the latter option would be necessary. Jason Merrill Bank of America GTO Learning Leadership Development eTools Multimedia Team ___ Flashcoders@chattyfig.figleaf.com 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 ___ Flashcoders@chattyfig.figleaf.com 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
Re: [Flashcoders] asfunction and single param
fyi: don't mind the space before google. it was a cut and paste mistake in an attempt to protect the innocent. ;) On Jun 19, 2007, at 1:54 PM, Raphael Villas wrote: Here is a trace from using the first strategy: == Website: font color='#ff'ua href='asfunction:getURL,http:// www. google.com' TARGET='_blank'www. google.com/a/u/font == The url still opens up in the same window as the Flash file, not a new window. The second strategy still doesn't work for me. It doesn't seem to be finding the function. Here's the trace: === Website: font color='#ff'ua href='asfunction:openInBrowser,http:// www.google.com'www.google.com/a/u/font === I've tried to remove the param and see if it can fire 'openInBrowser' with a simple trace, but it doesn't fire. Thanks for the feedback so far. Let me know if there are any other thoughts on this. :) On Jun 19, 2007, at 12:56 PM, Merrill, Jason wrote: Are you assembling a string like this: A HREF=http://www.adobe.com/cfusion/knowledgebase/index.cfm? id=tn_14157 TARGET=_blank or maybe this: A HREF=asfunction:myFunction,myParam TARGET=_blank ? If you use HTML text, getURL() is not necessary. If you want to use getURL afterall, then this should work: A HREF=asfunction:openInBrowser,myURLMy Text/A function openInBrowser(url) { getURL(url, _blank); } But I don't see why the latter option would be necessary. Jason Merrill Bank of America GTO Learning Leadership Development eTools Multimedia Team ___ Flashcoders@chattyfig.figleaf.com 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 ___ Flashcoders@chattyfig.figleaf.com 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 ___ Flashcoders@chattyfig.figleaf.com 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
RE: [Flashcoders] asfunction and single param
You're not following my first option right. My first option doesn't use asfunction, and it uses not '. It's just setting the value of the text to HTML code. No asfunction or getURL. The second option should work, try using instead of '. Jason Merrill Bank of America GTO Learning Leadership Development eTools Multimedia Team -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Raphael Villas Sent: Tuesday, June 19, 2007 2:55 PM To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] asfunction and single param Here is a trace from using the first strategy: == Website: font color='#ff'ua href='asfunction:getURL,http:// www. google.com' TARGET='_blank'www. google.com/a/u/font == The url still opens up in the same window as the Flash file, not a new window. The second strategy still doesn't work for me. It doesn't seem to be finding the function. Here's the trace: === Website: font color='#ff'ua href='asfunction:openInBrowser,http://www.google.com'www.goog le.com/ a/u/font === I've tried to remove the param and see if it can fire 'openInBrowser' with a simple trace, but it doesn't fire. Thanks for the feedback so far. Let me know if there are any other thoughts on this. :) On Jun 19, 2007, at 12:56 PM, Merrill, Jason wrote: Are you assembling a string like this: A HREF=http://www.adobe.com/cfusion/knowledgebase/index.cfm? id=tn_14157 TARGET=_blank or maybe this: A HREF=asfunction:myFunction,myParam TARGET=_blank ? If you use HTML text, getURL() is not necessary. If you want to use getURL afterall, then this should work: A HREF=asfunction:openInBrowser,myURLMy Text/A function openInBrowser(url) { getURL(url, _blank); } But I don't see why the latter option would be necessary. Jason Merrill Bank of America GTO Learning Leadership Development eTools Multimedia Team ___ Flashcoders@chattyfig.figleaf.com 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 ___ Flashcoders@chattyfig.figleaf.com 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 ___ Flashcoders@chattyfig.figleaf.com 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
Re: [Flashcoders] asfunction and single param
I think now that it's a scoping issue. Make sure the function is defined in the same class/movieclip as the textfield which contains the asfunction. You then just have to delegate it to where you need it. On 6/19/07, Raphael Villas [EMAIL PROTECTED] wrote: Here is a trace from using the first strategy: == Website: font color='#ff'ua href='asfunction:getURL,http:// www. google.com' TARGET='_blank'www. google.com/a/u/font == The url still opens up in the same window as the Flash file, not a new window. The second strategy still doesn't work for me. It doesn't seem to be finding the function. Here's the trace: === Website: font color='#ff'ua href='asfunction:openInBrowser,http://www.google.com'www.google.com/ a/u/font === I've tried to remove the param and see if it can fire 'openInBrowser' with a simple trace, but it doesn't fire. Thanks for the feedback so far. Let me know if there are any other thoughts on this. :) On Jun 19, 2007, at 12:56 PM, Merrill, Jason wrote: Are you assembling a string like this: A HREF=http://www.adobe.com/cfusion/knowledgebase/index.cfm? id=tn_14157 TARGET=_blank or maybe this: A HREF=asfunction:myFunction,myParam TARGET=_blank ? If you use HTML text, getURL() is not necessary. If you want to use getURL afterall, then this should work: A HREF=asfunction:openInBrowser,myURLMy Text/A function openInBrowser(url) { getURL(url, _blank); } But I don't see why the latter option would be necessary. Jason Merrill Bank of America GTO Learning Leadership Development eTools Multimedia Team ___ Flashcoders@chattyfig.figleaf.com 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 ___ Flashcoders@chattyfig.figleaf.com 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 ___ Flashcoders@chattyfig.figleaf.com 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
Re: [Flashcoders] asfunction and single param
I'm probably missing something but why exactly are you using asfunction?? Does this not work? a href=http://google.com; target=_blankgoogle.com/a regards, Muzak - Original Message - From: Raphael Villas [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Tuesday, June 19, 2007 7:27 PM Subject: [Flashcoders] asfunction and single param Hi everyone, I'm generating a hyperlink within a textarea component. I'd like to do a getURL by generating HTML that includes the hyperlink, opening up the page in a new window. So far, I have managed to generate the link and open up the page, but not in a new window. It would be great to use an asfunction call to a method that uses getURL with a _blank parameter, but it doesn't seem to be working for me. Any help is appreciated. If there's a better way to do this, do let me know. Here's my code: /** * This works **/ switch ( tNode ) { case web : var tURL:String = dealerNode.childNodes[y].childNodes [0].nodeValue.trim(); //This picks up the url var webURL:String = Website: font color='#ff'ua href='asfunction:openInBrowser,http://; + tURL + '; theOutput += webURL; break; } // Another switch statement closes the font and hyperlink tags /** * Here's my altered code... Since I can only pass in one parameter, I'm defining a function to open the link in a new window, but it doesn't work **/ switch ( tNode ) { case web : var tURL:String = dealerNode.childNodes[y].childNodes [0].nodeValue.trim(); //This picks up the url var webURL:String = Website: font color='#ff'ua href='asfunction:openInBrowser,http://; + tURL + '; theOutput += webURL; break; } function openInBrowser(url){ getURL(url); trace(url); //This doesn't work either }; ___ Flashcoders@chattyfig.figleaf.com 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 ___ Flashcoders@chattyfig.figleaf.com 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
Re: [Flashcoders] asfunction and single param
I'm using asfunction because I'm an idiot. Duh. This works. Thanks Jason and Muzak! On Jun 19, 2007, at 2:55 PM, Muzak wrote: I'm probably missing something but why exactly are you using asfunction?? Does this not work? a href=http://google.com; target=_blankgoogle.com/a regards, Muzak - Original Message - From: Raphael Villas [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Tuesday, June 19, 2007 7:27 PM Subject: [Flashcoders] asfunction and single param Hi everyone, I'm generating a hyperlink within a textarea component. I'd like to do a getURL by generating HTML that includes the hyperlink, opening up the page in a new window. So far, I have managed to generate the link and open up the page, but not in a new window. It would be great to use an asfunction call to a method that uses getURL with a _blank parameter, but it doesn't seem to be working for me. Any help is appreciated. If there's a better way to do this, do let me know. Here's my code: /** * This works **/ switch ( tNode ) { case web : var tURL:String = dealerNode.childNodes[y].childNodes [0].nodeValue.trim(); //This picks up the url var webURL:String = Website: font color='#ff'ua href='asfunction:openInBrowser,http://; + tURL + '; theOutput += webURL; break; } // Another switch statement closes the font and hyperlink tags /** * Here's my altered code... Since I can only pass in one parameter, I'm defining a function to open the link in a new window, but it doesn't work **/ switch ( tNode ) { case web : var tURL:String = dealerNode.childNodes[y].childNodes [0].nodeValue.trim(); //This picks up the url var webURL:String = Website: font color='#ff'ua href='asfunction:openInBrowser,http://; + tURL + '; theOutput += webURL; break; } function openInBrowser(url){ getURL(url); trace(url); //This doesn't work either }; ___ Flashcoders@chattyfig.figleaf.com 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 ___ Flashcoders@chattyfig.figleaf.com 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 ___ Flashcoders@chattyfig.figleaf.com 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