Named Target for links - Post ID 258460

User 379556 Photo


Registered User
1,583 posts

The Target options for links seem to be just Self, Blank, Parent, and Top. I would like to find a way to set the target of some links in a page to a named iframe within that page.

Since this must be a fairly common need in web pages, I guess there is some simple way of doing this within RSD that I have overlooked. I would be glad to learn the method.

Frank

PS. I thought I had found a simple solution by putting <base target="x" /> in the head of the page, and preventing the references in other links from being sent to the iframe by setting for them the target as Self. That would work if RSD entered target="_self" when Self is set as the target, but RSD seems not to do this (presumably because that is the default target and normally doesn't need to be specified).
User 379556 Photo


Registered User
1,583 posts

I think I've found a solution for when there is only one iframe in the page: following the procedure in the postscript to my post above, I've replaced Target Self with Target Top. The Targets Self amd Top seem to be equivalent in effect when used in whatever is already the top window/environment.

I would still appreciate help regarding the situation where there are two iframes in a page.

Frank
User 187934 Photo


Senior Advisor
20,266 posts

I'm not totally sure what your need is Frank. Can you explain a little more.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 450830 Photo


Registered User
148 posts

Hello frank

I believe you mean this <a href="#activiteiten" target="popup_single"> Read more ... </a>. I use it for modal windows see http://stichting-silverline.nl/ (I'm still working on this site)

It is not possible to create a link to RSD but you can do it in an HTML element, and then check the box to show live preview
groet,

Ger van Veen
http://schilder-vanveen.nl
User 187934 Photo


Senior Advisor
20,266 posts

Ger van veen wrote:
Hello frank

I believe you mean this <a href="#activiteiten" target="popup_single"> Read more ... </a>. I use it for modal windows see http://stichting-silverline.nl/ (I'm still working on this site)

It is not possible to create a link to RSD but you can do it in an HTML element, and then check the box to show live preview

Actually you can do everything in RSD. Use JQuey to add the needed attributes to you links.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 379556 Photo


Registered User
1,583 posts

Hi Eric and Ger, and thanks very much for looking at this. I was away yesterday and so haven't been able to explain more fully until now.

What I am trying to do in RSD -
I am tryingin RSD to replicate pages like the one here. It will be seen that there are two iframes, one for the links to Bible texts, and one for numbered chapter endnotes. For reasons connected with the copyright arrangements under which I put the books on the internet, the layout of this (utilitarian rather than artistic) site at full width is not to be changed. The page mentioned was prepared in RLM Pro when I knew even less than I do now. Redoing it in RSD (as I have already done with the Sweet Harmonies book) is primarily to simplify what was overly complex before, and to tidy up what was somewhat messy at narrower widths.

Ger:
Yes indeed that was what I had in mind. I had used a named target to point links to the chapter endnotes in the page mentioned above using HTML Editor. I was surprised when I tried and failed in RSD to use target="iframe-name".

Eric:
I fear that at present I am ignorant of the jQuery Javascript library. As I do wish to have everything 'self-contained' within RSD, I intend to set about learning it sufficiently to understand how one uses it to add attributes to links.

CoffeeCup team:
It would be very convenient if the target options for links were extended to include iframe names.

My thanks again to Eric and Ger for your contributions regarding this.

Frank
User 379556 Photo


Registered User
1,583 posts

Ger van veen wrote:

It is not possible to create a link to RSD but you can do it in an HTML element, and then check the box to show live preview

That has proved more useful than I initially thought it might, as I have found I can still let RSD do the styling of the paragraph and its links.

For example, I have a paragraph with several links in it, and I prepare it in a paragraph element. I then do the following.
1. I use 'Preview on ...' to bring the page up in my browser (Firefox), press Ctrl+u to show the code, and cut and paste that paragraph's code into Notepad++.
2. I cut and paste the required target="appropriate-iframe-name" into the links in Notepad++.
3. In RSD I put an HTML element where I want the paragraph to appear, and paste the contents of Notepad++ into it.
4. I delete the original paragraph element, and find that RSD cleverly retains for the HTML element the styling that had been set up in the paragraph element.

It is important to do steps 3 and 4 in that order, as otherwise RSD deletes the styling that has been copied into the HTML element.

Thanks again, Ger.

Frank

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.