Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Problem using a href inside a CDATA??

Options
  • 28-01-2009 9:08pm
    #1
    Registered Users Posts: 366 ✭✭


    Hi I am developing a website using a flash template. All edits are made in an XML file that is feed into the .fla but I am having trouble with external links. I have not got a huge amount of experience in this area. I dont want to do anything fancy, I just want links to open in a new window.

    So, these work fine:

    <![CDATA[<a href="event:switchPage,7">PRIVACY POLICY</a> | <a href="event:switchFullScreen">FULLSCREEN</a> ]]>

    <![CDATA[<A HREF="event:getURL,mailto:info@xxx.ie,_blank"><u>info@xxxx.com</u></A>]]>


    But I dont knwo what to do in this situation to get say www.google.com to open in a new window....
    <![CDATA[<A HREF="event:getURL,asfunction:link,_blank"><U>Click Here</U></A>]]>

    I've been stuck on this for the last three hours and for once google isn't helping at all!!

    Thanks in advance for any suggestions...


Comments

  • Registered Users Posts: 605 ✭✭✭PaddyTheNth


    I know nothing about flash, but I'll have a stab at it...
    [B]<![CDATA[<A HREF="event:getURL,asfunction:link, target='_blank'"><U>Click Here</U></A>]]>[/B]
    
    [B]<![CDATA[<A HREF="event:getURL,asfunction:link" target="_blank"><U>Click Here</U></A>]]>[/B]
    
    I suspect the second one is more likely to work.


  • Registered Users Posts: 1,045 ✭✭✭Bluefrog


    What happens with
    <![CDATA[<A HREF="event:getURL,http://www.google.ie,_blank">www.google.com</A>]]>
    


  • Registered Users Posts: 366 ✭✭Kaskade


    Hi PaddyTheNth, I dont think its the _blank thats the problem since it is working for the mailto, I just dont know where to put the URL.

    BlueFrog, I tried what you said hours ago but nothing happens when I click on the link. When I right click and go open in a new window I get this error "event is not a recognized protocol". This is the exact code I used....

    <![CDATA[<A HREF="event:getURL,[url]http://www.google.com[/url] ,_blank"><FONT COLOR="#2992b6"><U>Click Here</U></FONT></A>]]>


    Thanks for the replies though, any other suggestions!!


  • Closed Accounts Posts: 8,866 ✭✭✭Adam


    Kaskade wrote: »
    Hi PaddyTheNth, I dont think its the _blank thats the problem since it is working for the mailto, I just dont know where to put the URL.

    BlueFrog, I tried what you said hours ago but nothing happens when I click on the link. When I right click and go open in a new window I get this error "event is not a recognized protocol". This is the exact code I used....

    <![CDATA[<A HREF="event:getURL,[URL]http://www.google.com[/URL] ,_blank"><FONT COLOR="#2992b6"><U>Click Here</U></FONT></A>]]>


    Thanks for the replies though, any other suggestions!!

    i believe if you're specifying more than just the url you need to use brackets:
    <![CDATA[<A HREF="event:getURL("http://www.flashkit.com","_blank")">
    


  • Registered Users Posts: 366 ✭✭Kaskade


    tried that but then the link (ie the text inside the CDATA) doesn't even appear, just a blank space where the text was. Here is the exact line I used
    <![CDATA[<A HREF="event:getURL("http://www.google.com","_blank")"><FONT COLOR="#2992b6"><U>click here</U></FONT></A>]]>
    

    Are there any other ways that I can get a link to work, even if it is different to the getURL event?


  • Advertisement
  • Registered Users Posts: 366 ✭✭Kaskade


    just uploaded the site to my server and the it is now working fine with no brackets. So frustrating, I have been trying to figure this out for hours!!

    Thanks so much for all the suggestions


  • Registered Users Posts: 605 ✭✭✭PaddyTheNth


    Kaskade wrote: »
    just uploaded the site to my server and the it is now working fine with no brackets. So frustrating, I have been trying to figure this out for hours!!

    Thanks so much for all the suggestions

    Good stuff. So what's the code that worked?


  • Registered Users Posts: 366 ✭✭Kaskade


    what I originally had....

    <![CDATA[<A HREF="event:getURL,http://www.google.com,_blank"&gt;


Advertisement