Discussions

Expand all | Collapse all

Rich Text Formula to Open URL In New Window

  • 1.  Rich Text Formula to Open URL In New Window

    Posted 08-09-2018 01:37
    Hi all,

    I wanted to create some buttons on a form in my app that show an image, and clicking on it sends you to a URL.

    the field type is Formula - Rich Text and the code is below...

    "<a href=\"MyURL"><img src=\"MyImage" width=125></a>"

    this formula works but opens the URL in the same window. Can someone please advise how i would amend this code to have the link open up in a new window?

    I chopped together this formula from the magic buttons app and i tried searching the forum for the answer but to no avail

    Thanks in advance :-)


  • 2.  RE: Rich Text Formula to Open URL In New Window

    Posted 08-09-2018 01:40
    Try this


    "<a target="_blank"
     href=\"MyURL"><img src=\"MyImage" width=125></a>"


  • 3.  RE: Rich Text Formula to Open URL In New Window

    Posted 08-09-2018 01:41
    ie.

    "<a target="_blank" href= .. etc


  • 4.  RE: Rich Text Formula to Open URL In New Window

    Posted 08-09-2018 01:56
    thanks for the fast reply. I tried that and get the following error


  • 5.  RE: Rich Text Formula to Open URL In New Window

     
    Posted 08-09-2018 02:04
    You�re building a string containing quotes. You�ll have to escape them or change the quote types. See if changing the quotes around �_blank� to single quotes works. You�ll need to do the same for the other attribute too.


  • 6.  RE: Rich Text Formula to Open URL In New Window

    Posted 08-09-2018 02:10
    you're a legend mate, that did the trick

    Cheers lads