rejetto forum

Web Links in new Window/Tab

dtrieb · 5 · 2773

0 Members and 1 Guest are viewing this topic.

Offline dtrieb

  • Occasional poster
  • *
    • Posts: 1
    • View Profile
It would be nice if i can set the Links that i add under right Click -> "New Link" open in an new window/Tab if i click on my htf server site!


Offline bmartino1

  • Tireless poster
  • ****
    • Posts: 910
  • I'm only trying to help i mean no offense.
    • View Profile
    • My HFS Google Drive Shared Link
if i'm reading this corectly, you want a website guest to click a link, and that link to open in a new tab
and/or a new window?

possilbe html solution:
http://stackoverflow.com/questions/15551779/open-link-in-new-tab

<a target="_blank" href="http://your_url_here.html">Link</a>
Files I have snagged and share can be found on my google drive:

https://drive.google.com/drive/folders/1qb4INX2pzsjmMT06YEIQk9Nv5jMu33tC?usp=sharing


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
try pasting this diff template in your root folder

Code: [Select]
[+list]
<script>
$(function(){
  $("a[href^=http]").attr({ target:'_blank' });
});
</script>


Offline Awesoft

  • Occasional poster
  • *
    • Posts: 34
    • View Profile
I tried the code in the root/home icon: Properties > Diff Template... but doesn't work.

Code: [Select]
[+list]
<script>
$(function(){
  $("a[href^=http]").attr({ target:'_blank' });
});
</script>

Everything I open is on the same tab.
Where is the problem?

Thank you.
« Last Edit: December 09, 2016, 01:13:49 PM by Awesoft »


Offline bmartino1

  • Tireless poster
  • ****
    • Posts: 910
  • I'm only trying to help i mean no offense.
    • View Profile
    • My HFS Google Drive Shared Link
I tried the code in the root/home icon: Properties > Diff Template... but doesn't work.

Code: [Select]
[+list]
<script>
$(function(){
  $("a[href^=http]").attr({ target:'_blank' });
});
</script>

Everything I open is on the same tab.
Where is the problem?

Thank you.

new tabs are conductive of the browser interpretation

a target="_blank"

usually opens items in a new tab

i believe you will have to add the list to you template (menu > html > edit template > "find list......" ), or other html code...

if you put a different template after the folder, the caring code will not be implemented.

-------------------------------------
example

HFS default template
says hello world

in hfs, i'm sharing folder "A" , "b", "C"


If i right click properties > different template on folder "b", and add html
saying i'm a folder

Then
someone traversing the site would see nothing but "Hello world", they know of  folder "A" and put in that path. They will see the default template witch would say "hello world"

but if they go to b, that template is ignored, and all code form it is not implemented, as such, you see the pre programmed  " i'm folder ..."

------------------

I believe you have a bunch of folders or path that have changed the template, so yo will need to go down the list of where the code stops and add in the code you implement...

i add hfs macro above my own html, so the folder your having a problem with
right lick properties > different template

###########
[+list]
<script>
$(function(){
  $("a[href^=http]").attr({ target:'_blank' });
});
</script>

[body]
<html>
your code here
<html/>
Files I have snagged and share can be found on my google drive:

https://drive.google.com/drive/folders/1qb4INX2pzsjmMT06YEIQk9Nv5jMu33tC?usp=sharing