Passing a URL ...

Page: 1

Author Post
Member
Registered: Apr 2009
Posts: 28
Currently, in a content management template, we display an
Include on each content page.

Instead of displaying directly on the page, we'd like to
display in Floatbox.

Is it possible to "pass" the Include url to Floatbox?

The url is different on each page, so we can't hardcode
a generic function. Each page needs to pass it's unique
url to Floatbox.

Ideas? Thanks much.

Jim
Administrator
Registered: Aug 2008
Posts: 3382
I'm pretty sure I don't understand, but let's not let that get in the way of me offering up an idea here.

Would it help to consider placing the included content that you want to show in floatbox into a hidden div and then autoStarting floatbox with that content? The relevant part of your page could look something like this:
<a href="#myDiv" class="floatbox" rev="autoStart:true width:600 height:400"></a>

<div id="myDiv" style="display:none;">
<p>This is the content that came from my cms template</p>
</div>


I'm probably way off base here. The reason I suspect this is because you mentioned something about "the include url" and I have no idea what you mean by that and there's nothing in my little sample that involves a url. If I'm on the wrong track (it happens a lot) you'll have to take another crack at straightening me out.
Member
Registered: Apr 2009
Posts: 28
I don't think you're too far off base.
Based on your suggestion, I should do this:

<a href="#myDiv" class="floatbox" rev="autoStart:true width:600 height:400">test</a> 
<div id="myDiv" style="display:none;"> <? include "http://www.mysite.com/cgi-bin/artman2/search.cgi?action=search&keywordSearchFields=keyword&keyword=$article.keyword$&template=searchEngine/related_articles3.html&perpage=10" ; ?>
</div>


I already have Floatbox running on the test page; for some reason though,
the above code doesn't launch. What am I doing wrong?

Thanks.
Administrator
Registered: Aug 2008
Posts: 3382
I can't do anything with the server side asp code. I need to see what's on the html page that gets delivered to the browser. That's what the floatbox javascript code sees. What is the resultant div content after the asp <? include ?> does its thing? Or better yet, can I see a page online?
Member
Registered: Apr 2009
Posts: 28
But, shouldn't Floatbox launch regardless of what's in the div?
Member
Registered: Apr 2009
Posts: 28
An example looks like this:

http://www.growth trac.com/cgi-bin/artman2/search.cgi?action=search&keywordSearchFields=keyword&keyword=_love&template=searchEngine/related_articles3.html&perpage=10
Administrator
Registered: Aug 2008
Posts: 3382
Yes. Good point. Thanks for waking me up.

But it isn't launching. And I'd really need to see the page to search for the reason for that. I can't just guess.

If you can show this online somewhere but don't want to post a public url, just send the url to me via this site's contact form.

Cheers...
Administrator
Registered: Aug 2008
Posts: 3382
Ah. That link is the content that gets pulled in by the include statement I assume. You're right, I don't need to see that. What I need is the containing full page with the floatbox stuff on it.
Member
Registered: Apr 2009
Posts: 28
Here you go:
http://www.growth trac.com/artman/publish/a-conversation-with-bo-bice-1222.php

Scroll down to the bottom and look for the "test" link. Just above
the "Top Hits" banner.

I just noticed that the "Include" is actually displaying the include
content within the div...

Thanks much.
Administrator
Registered: Aug 2008
Posts: 3382
Ah hah! You're using an older version of floatbox. Change class="floatbox" to rel="floatbox"

My work here is done. :D
Member
Registered: Apr 2009
Posts: 28
Success! Thanks much.
« Last edit by jmueller0823 on Thu May 21, 2009 1:16 pm. »

Page: 1