How to link to a page in new window?

New to web-building ? Simple answers to "How do I . . .?"

Moderators: BobCP, agsone, Neil Parks, gregtutor, Lem3

How to link to a page in new window?

Postby mcinner on Wed Mar 07, 2018 9:40 am

Hi!
I'm new to Kompozer (but not new to HTML).
I wonder how to link to a new page - but the new page should open in its own window.
I don't find an option in the link-tool...
Thanks!
mcinner
 
Posts: 3
Joined: Mon Mar 05, 2018 12:28 pm
Country: Austria (at)

Re: How to link to a page in new window?

Postby wink0r on Wed Mar 07, 2018 3:42 pm

The option is available. As I recall it is through a dropdown menu in the lower half of the link dialog wizard.
wink0r
 
Posts: 2594
Joined: Tue Aug 28, 2007 10:10 pm
Location: East Coast - USA
Country: United States (us)

Re: How to link to a page in new window?

Postby gregtutor on Wed Mar 07, 2018 4:31 pm

I can confirm wink0r's response. The section of the "Link Properties" dialogue is headed "Target".

However, forcing links to open in a new window is generally frowned upon these days on usability grounds. It can cause difficulties both for those with visual impairments and who use screen readers as well as those using mobile devices where tapping a link can appear to have done nothing, so they tap repeatedly until they discover their error and their browser's score of unwanted windows.

These days you expect the user to make up their own mind if they want the link in a new window. Those who want it in a new window will know that a wheel-click will normally do it, alternatively right-click or tap/hold and select the option on the menu that appears.
Greg Chapman
http://www.gregtutor.co.uk
Helping new users of KompoZer - but using BlueGriffon
gregtutor
Moderator
 
Posts: 3778
Joined: Wed Jun 20, 2007 8:25 am
Location: The Norfolk Broads, UK
Country: England (en)

Re: How to link to a page in new window?

Postby mcinner on Fri Mar 09, 2018 4:51 pm

Thanks for your responses.
I cannot find such an option in the link-option-window of the picture which serves as link:

Image


EXPLANATION:
Years ago I built a website with Frontpage which I now want to migrate or rebuild with Kompozer.
I want to show a picture above the index-page - see below:

Image
Last edited by mcinner on Fri Mar 09, 2018 4:51 pm, edited 3 times in total.
mcinner
 
Posts: 3
Joined: Mon Mar 05, 2018 12:28 pm
Country: Austria (at)

Re: How to link to a page in new window?

Postby gregtutor on Sat Mar 10, 2018 12:49 am

Ah! wink0r and I were referring to the "image Properties" dialogue that has the additional options to control the target of a link.

These days your example would be coded with CSS. I have a crude example that demonstrate the principles at:
http://www.gregtutor.co.uk/webdesign/demomagnify.html

However, the CSSplay site, linked there, has many more sophisticated examples that you could use.
Greg Chapman
http://www.gregtutor.co.uk
Helping new users of KompoZer - but using BlueGriffon
gregtutor
Moderator
 
Posts: 3778
Joined: Wed Jun 20, 2007 8:25 am
Location: The Norfolk Broads, UK
Country: England (en)

Re: How to link to a page in new window?

Postby mcinner on Sat Mar 10, 2018 7:11 pm

Ok, thanks a lot!
Cheers!
mcinner
 
Posts: 3
Joined: Mon Mar 05, 2018 12:28 pm
Country: Austria (at)

Re: How to link to a page in new window?

Postby dr-john on Sat Mar 17, 2018 2:50 pm

This sort of action is normally done using javascript to open a pop-up window.
dr-john
 
Posts: 618
Joined: Wed May 13, 2009 1:37 pm
Location: Kent
Country: Scotland (sp)

Re: How to link to a page in new window?

Postby gregtutor on Sat Mar 17, 2018 5:09 pm

Hi dr-john,

Maybe!

But doing it with CSS means that's another language I can put off learning! :-)
Greg Chapman
http://www.gregtutor.co.uk
Helping new users of KompoZer - but using BlueGriffon
gregtutor
Moderator
 
Posts: 3778
Joined: Wed Jun 20, 2007 8:25 am
Location: The Norfolk Broads, UK
Country: England (en)

Re: How to link to a page in new window?

Postby gregtutor on Tue Mar 20, 2018 2:26 pm

dr-john has posted this in another topic but I think it belongs here...

dr-john wrote:Ah but this is how easy it is, in this case opening a pop-up window with a bigger version of the image and some more descriptive words in the new page, called powerflarm-core.htm:

In the html of the original page.

Code: Select all
<a href="javascript:OpenCentreWindowW('powerflarm-core.htm');">
<img src="images/powerflarm-core-s.jpg" alt="PowerFlarm Core" width="250" height="193" align="left" title="PowerFlarm Core">
</a>


and the javascript, in a separate file

Code: Select all
function OpenCentreWindow(source)
{
var h=480; // height of window
var w=480; // width of window
var leftPos=(screen.width/2)-(w/2); // left position of window
var topPos=(screen.height/2)-(h/2); // top position of window
var pos='left='+leftPos+',top='+topPos;
props=pos+',width='+w+',height='+h;
window.open(source,'new',props);
}

function OpenCentreWindowL(source)
{
var h=600; // height of window
var w=470; // width of window
var leftPos=(screen.width/2)-(w/2); // left position of window
var topPos=(screen.height/2)-(h/2); // top position of window
var pos='left='+leftPos+',top='+topPos;
props=pos+',width='+w+',height='+h;
window.open(source,'new',props);
}

function OpenCentreWindowW(source)
{
var h=550; // height of window
var w=550; // width of window
var leftPos=(screen.width/2)-(w/2); // left position of window
var topPos=(screen.height/2)-(h/2); // top position of window
var pos='left='+leftPos+',top='+topPos;
props=pos+',width='+w+',height='+h;
window.open(source,'new',props);
}


There are about four or five other different sizes of pop-up window - XL, XW, VW etc, all in the single file which I named as openup.js. Each function has a letter added to its name to signify its size, and you use the one that's most suitable for the task.

I've used it on many different sites - write it once, use it many times. The different sized windows were added whenever necessary, and I bet you could add a new size in a few minutes, without learning javascript, just by inspecting the code.

then just add this line to the head of a page where required

Code: Select all
<script src="scripts/openup.js" language="Javascript" type ="text/javascript"></script>


(I take the oposite view, the more I learn, the better I will become.)


He's right, of course I should set aside some time to learn JavaScripty
Greg Chapman
http://www.gregtutor.co.uk
Helping new users of KompoZer - but using BlueGriffon
gregtutor
Moderator
 
Posts: 3778
Joined: Wed Jun 20, 2007 8:25 am
Location: The Norfolk Broads, UK
Country: England (en)

Re: How to link to a page in new window?

Postby dr-john on Tue Mar 20, 2018 10:36 pm

Well that takes real skill - the right answer but for the wrong question!!!

In my defense, I wasn't logged in and after logging in obviously clicked the wrong question to reply to...
As I used to say to all my students -
Read the question.
Read the question again.
Then answer the question I wrote, not the one you think I wrote.

Must remember to do that myself...
dr-john
 
Posts: 618
Joined: Wed May 13, 2009 1:37 pm
Location: Kent
Country: Scotland (sp)


Return to Beginner Q & A


Who is online

Users browsing this forum: No registered users and 1 guest