How to target iframe on a different page

Wow, Walter, that was fast. I made the change as suggested, but doesn’t work. I’ve spelled out the change on the page again:

http://cecilsellers.com/test_iframe/link_page.html

Perhaps I have it incorrect.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

You need to take your entire ‘site’ parameter and rawurlencode it.
Right now, you have the syntax correct as far as it goes, but unless
you rawurlencode it, your parameter is being cut off at the very
first &. That’s because PHP has no way to distinguish between the
ampersands within your site variable’s value and the ampersands that
would be used to add additional variables beyond the site variable in
your page’s own querystring.

site=designer.realtimedesigner.com/abettersign/index.php? 

cpi=1246&cti=104
//should be:
site=designer.realtimedesigner.com%2Fabettersign%2Findex.php%3Fcpi%
3D1246%26cti%3D104

Walter

On Apr 7, 2008, at 11:18 AM, cosjr wrote:

Wow, Walter, that was fast. I made the change as suggested, but
doesn’t work. I’ve spelled out the change on the page again:

NameBright - Coming Soon

Perhaps I have it incorrect.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

On 7 Apr. 2008, 8:41 pm, waltd wrote:

You need to take your entire ‘site’ parameter and rawurlencode it.
Right now, you have the syntax correct as far as it goes, but unless
you rawurlencode it, your parameter is being cut off at the very
first &. That’s because PHP has no way to distinguish between the
ampersands within your site variable’s value and the ampersands that
would be used to add additional variables beyond the site variable in
your page’s own querystring.

site=designer.realtimedesigner.com/abettersign/index.php?cpi=1246&cti=104
//should be:
site=designer.realtimedesigner.com%2Fabettersign%2Findex.php%3Fcpi%3D1246%26cti%3D104

I’ve added this bit also to the example page. Still get the same results. The “index.php?cpi=1246&cti=104” which is now “index.php%3Fcpi%3D1246%26cti%3D104” is not loading correctly, although that part appears in the address bar. I should still be using rawurldecode in the code before html on iframe page, correct?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

It appears to be working, it just doesn’t fit. Try making your iframe
wider, and set its height to much taller. You could also try enabling
scrolling for your iframe, which would (partially) solve the height
issue.

Walter

On Apr 7, 2008, at 5:05 PM, cosjr wrote:

On 7 Apr. 2008, 8:41 pm, waltd wrote:

You need to take your entire ‘site’ parameter and rawurlencode it.
Right now, you have the syntax correct as far as it goes, but unless
you rawurlencode it, your parameter is being cut off at the very
first &. That’s because PHP has no way to distinguish between the
ampersands within your site variable’s value and the ampersands that
would be used to add additional variables beyond the site variable in
your page’s own querystring.

site=designer.realtimedesigner.com/abettersign/index.php?
cpi=1246&cti=104
//should be:
site=designer.realtimedesigner.com%2Fabettersign%2Findex.php%3Fcpi
%3D1246%26cti%3D104

I’ve added this bit also to the example page. Still get the same
results. The “index.php?cpi=1246&cti=104” which is now “index.php%
3Fcpi%3D1246%26cti%3D104” is not loading correctly, although that
part appears in the address bar. I should still be using
rawurldecode in the code before html on iframe page, correct?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

On 7 Apr. 2008, 9:17 pm, waltd wrote:

It appears to be working, it just doesn’t fit.

Actually, that’s the point. It APPEARS to be working. It is working to load part of the URL. What you are seeing is the default load of “designer.realtimedesigner.com/abettersign/”.

The way I know this is because the small java graphic thing that says “Start Designing” is on the default page for my site. If the rest of the url loaded that part wouldn’t be there and there would be other text items loaded. You can see the proper example of this in the third test link “Click this link” down the page. The remaining part of the url “index.php?cpi=1246&cti=104” isn’t getting loaded.

Thank you for being patient with this.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

When I enter <http://designer.realtimedesigner.com/abettersign/
index.php?cpi=1246&cti=104> in a browser, I see the exact same thing
as when I see it called out in the iframe. But if I enter <http://
designer.realtimedesigner.com/abettersign/index.php&cpi=1246&cti=104>
in the browser, I see the example text for a magnet. Which is totally
wacked out. The former is a valid URL, and the latter is not, but the
invalid URL works.

Okay, new plan:

<site=designer.realtimedesigner.com%2Fabettersign%2Findex.php%3Dcpi%
3D1246%26cti%3D104>

goes in the URL, substituting %3D for %3C.

This should work. Really. Otherwise, it will be time to call these
folk and tell them that their page is broken. (Which it certainly is.)

Walter


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Walter, when you enter

designer.realtimedesigner.com/abettersign/index.php&cpi=1246&cti=104

in the browser it is exactly what I want you to see. The text example for a magnet. It is supposed to look that way. That is the URL I want to load, not the other called out in the iframe.

Here is a jpg version, in case we aren’t seeing the same thing.

I know this post is getting long and your time is valuable. It wouldn’t be so difficult if the url was simpler. Thank you.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Did you get my last post? I pointed out that when you enter an
INVALID, BROKEN URL, it works perfectly. And when you enter a
correctly-formed URL, it does not. There is clearly something wrong
with the page on realtimedesigner, it is not properly decoding the
querystring.

Walter

On Apr 8, 2008, at 6:45 AM, cosjr wrote:

Walter, when you enter

designer.realtimedesigner.com/abettersign/index.php&cpi=1246&cti=104

in the browser it is exactly what I want you to see. The text
example for a magnet. It is supposed to look that way. That is the
URL I want to load, not the other called out in the iframe.

Here is a jpg version, in case we aren’t seeing the same thing.
http://cecilsellers.com/tests/stuff/page_to_show_magnet.jpg

I know this post is getting long and your time is valuable. It
wouldn’t be so difficult if the url was simpler. Thank you.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Okay. Yes, that is clear to me now. Sorry. I will contact them about it. Thanks for all your help. How do donate to your cause?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

There’s a donate button on my Actions repository: <http://
freewaypro.com/actions/downloads>

Thanks in advance if you do donate, but you’re welcome in any case.

Walter

On Apr 8, 2008, at 8:44 AM, cosjr wrote:

Okay. Yes, that is clear to me now. Sorry. I will contact them
about it. Thanks for all your help. How do donate to your cause?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi there,
I was going through the thread and have a similar problem.
Please help.

http://www.motherjane.in/index2.html

Now, I need to send out a url that when clicked on, opens the motherjane.in/index2.html with motherjane.in/band in the iframe ‘body’.

Please help.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

There’s two ways to handle this. One is to have your frameset page be written in PHP or another server-side language, and pass a variable to it in the request, so your frameset knows which page to load into the frame or frames. The other is to do the same thing, except with JavaScript. This second method has all sorts of down-sides, so I don’t recommend it as highly as the PHP.

In either case, your URLs that you use to load the frameset + non-default page would look nearly the same:

http://example.com/frameset.php?frame1=somepage.html
or
http://example.com/frameset.html?frame1=somepage.html

Here’s how to build the PHP one. (I assume, with some degree of certainty, that your server supports PHP. Most do.)

You’ve already built a frameset in Freeway. So you have the local equivalent of frameset.html already. If you were to look inside the source code for this file, you would find that it doesn’t have all that much inside it, just references to other pages and some instructions for how to assemble the composite page.

What you need to do is translate the automatic URLs that Freeway has made for you into references to programming variables. Let’s keep this simple, and say that you’ve got a basic top-banner, bottom-stretchy-area style frameset, and you’re only interested in loading the content into the bottom frame. The top frame will always be the same.

Open up your Frames palette, and double-click on the bottom frame there. You will see a dialog very similar to the Hyperlink dialog, where you may choose which page will load into that frame by default. Click over to the External tab, and enter the following:

<?php echo $frame_src; ?>

Okay out of the dialog. Your bottom frame will have disappeared, replaced by some text indicating the URL. At this point, you should also use the Page Inspector to change the filename of your frameset from frameset.html to frameset.php. This will not change the Title of your page, only the Filename.

Now open the Page / HTML Markup dialog on the frameset page and move to the Before HTML section. Enter the following code there:

<?php 
$frame_src = 'your_default_page.html';
if(isset($_GET['frame1'])){
    if(file_exists(dirname(__FILE__) . '/' . $_GET['frame1'])){
        $frame_src = $_GET['frame1'];
    }
}
?>

Now you cannot preview this frameset locally any more, you will have to upload it to your server to see anything, because PHP requires the server to read and interpret the instructions before sending HTML to your browser.

To use this, you would simply create URLs that include the filename of the page you want to load into the bottom frame (and you’d have to make sure that page is in the same folder as the frameset file itself – there’s a strong security measure in the code above, meant to keep someone from viewing http://example.com/frameset.php?frame1=/etc/passwd or something equally embarrassing. You’ll have to enter those URLs manually, using the External tab of the Hyperlink palette.

Let us know how it goes, if this works or not.

Walter


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options