Database URL open in new window

Database URL open in new window

by Gibson Wilson -
Number of replies: 7

HI

I am very new and I am setting up a list of URL's in a database. When they are listed and you click on them they open in the same window...how do I make them open in a new window ?

Thanks for the help

All the best, Gibby

Average of ratings: -
In reply to Gibson Wilson

Re: Database URL open in new window

by Christoph Ruda -
In order for a link to open in a new window you need to add target="_blank" to the opening tag of your link.

Example:
<a href="http://www.your.link" target="_blank">link</a>

If you use the built-in editor to add your links select new window from the target drop-down menu in the link dialog, which you get when you click the chain icon.

Hope this helps.

Christoph
In reply to Christoph Ruda

Re: Database URL open in new window

by Fernando Oliveira -
Picture of Plugin developers

The problem is that the database automatically generates links that are supplied in the url field (www.your.link.com). Ideally, it should have a "new window/same window" toggle.  Any ideas how to get around this?

Thanks,

Fernando

In reply to Fernando Oliveira

Re: Database URL open in new window

by Nigel Osborne -
I would like to do the same thing. Does anyone have an answer to this?
In reply to Gibson Wilson

Re: Database URL open in new window

by Anton Coltham -
Hi Gibby

I tried this and it seems to have worked.


Make sure that the "Autolink the URL" is NOT selected

Then in the template section for each template add the following (the bolded bit) to the html

<tr>
<td valign="top" align="right">URL:
</td>
<td style="text-align: left;"><a target="_blank" href="URL">URL</a>
</td>
</tr>


Cheers
Anton
In reply to Anton Coltham

Re: Database URL open in new window

by .. .. -

If its in a database, and you want it to link to whatever is entered in the add template, then you need to add the following hyperlink code (in red) around the normal position of the field place holder (i.e. someword:

<a href="website" target="blank">website</a>

As you can see from the above, in the templates, there is a section where the user enters the website URL into a field (the field type is URL and I have given it the name website - you can call it whatever you like).

The URL field gives a text box with the text "http://" already inserted. When a user adds an entry they just continue with www.google.com so it ends up looking like http://www.google.com. When they save it, and view the entry, this hyperlink will open a new page and go to google.

In reply to .. ..

Re: Database URL open in new window

by Leon Huang -

Hi All,

 

Can't seem to do it? can anyone help? Can't get the url to open in new window. And when I get it to open to new window - there is a prefix of our domain which appears in front of the url. Eg. http://Leon.edu.au/google.com

which will not work.

Cheers.

In reply to Leon Huang

Re: Database URL open in new window

by Fig Newton -

If you are still wondering how to do this....

 

Use the label resource, not the URL link.  Type the text for the lable, click the chain button to create the url link. You will have to manually change the color of the text to indicate that it is a clickable link.