Forum: Radiant CMS iFrame links

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Keith B. (Guest)
on 2007-05-29 12:50
(Received via mailing list)
This isn't really a radiant problem, but maybe one of you can help
me. I have been forced to use iframes because the client wants music
on the site. Now he wants links to specific pages, which of course
poses a problem. Does anyone know how to generate a link directly to
a specific page within an iFrame? The only solution I have heard of
so far involved setting a php variable in the link, the reading this
back out (the author of this idea assumed I was using php).

Any ideas?

Keith B.
Tel: +49-7731-79838380
removed_email_address@domain.invalid
http://keithbingman.com
Oliver B. (Guest)
on 2007-05-29 18:16
(Received via mailing list)
On 29/05/07 05:48 AM, Keith B. was heard to say:
> This isn't really a radiant problem, but maybe one of you can help
> me. I have been forced to use iframes because the client wants music
> on the site. Now he wants links to specific pages, which of course
> poses a problem. Does anyone know how to generate a link directly to
> a specific page within an iFrame?

Not sure I understand what you are asking, but opening a link into a
different window is done with the "target" attribute of the <a> tag.
Example:
<a href="url" target="iframe_name">...</a>

Oliver
Keith B. (Guest)
on 2007-05-29 18:20
(Received via mailing list)
Yes. That is clear. I am trying to link directly to a page with an
iFrame from an external link. Basically a bookmark. I think I know
how to do it, but thought I see if there was something I was
overlooking. Doesn't seem to be.

Keith B.
Tel: +49-7731-79838380
removed_email_address@domain.invalid
http://keithbingman.com
Oliver B. (Guest)
on 2007-05-29 18:49
(Received via mailing list)
Keith B. wrote:
> Yes. That is clear. I am trying to link directly to a page with an
> iFrame from an external link. Basically a bookmark. I think I know
> how to do it, but thought I see if there was something I was
> overlooking. Doesn't seem to be.

I understand. I would probably use Javascript to make this work. For
example a URL http://host/frameset.html?content.html would load the
frameset and a Javascript within this page can evaluate the query string
and load the appropriate page into the frame. This script may or may not
  work:

<script type="text/javascript">
file = "default_content.html";
if (location.search.length > 0) {
   file = location.search.substring(1);
}
document.write('<iframe src="' + file + '" name="contentframe"');
document.write(' width="400px" height="300px" frameborder="0" ');
document.write('scrolling="no">No Iframes</iframe>');
</script>

Oliver
Keith B. (Guest)
on 2007-05-29 18:54
(Received via mailing list)
This is what I was thinking of doing, though perhaps as a Virtual
page. My Ruby is better than my javascript... But I will give it a
thought. Thanks!


Keith B.
Tel: +49-7731-79838380
removed_email_address@domain.invalid
http://keithbingman.com
Walter D. (Guest)
on 2007-05-29 18:59
(Received via mailing list)
Basically, it sounds to me as if you are trying to load a page which
contains an iFrame, and then programmatically direct that iFrame to
load a different source than its default. If I were doing it in PHP
(sorry) I would script the iFrame to load a sanitized version of a
querystring variable. Maybe someone on the list will be able to tell
you how to do this in R/R/R.

Walter
Keith B. (Guest)
on 2007-05-29 19:05
(Received via mailing list)
Yes, this is exactly what I am trying to do.

My basic plan at the moment is to make a Virtual Page type for the
mian pae (with the iFrame) and grab the query string. Then I can just
reset the source of the iFrame or redirect the page. Hopefully, that
will work.

You guys have helped a lot, I will let you know what I actually end
up doing.

Keith B.
Tel: +49-7731-79838380
removed_email_address@domain.invalid
http://keithbingman.com
This topic is locked and can not be replied to.