Forum Moderators: phranque
It seems to me that a simple link with a target="_blank" should be sufficient, but they want the whole interactive chart on their blog page. The chart is composed of several image files, and is controlled by a fair amount of javascript, so giving them the source code wouldn't work.
Is there any way to do this?
Thanks in advance for any replies.
and is controlled by a fair amount of javascript, so giving them the source code wouldn't work.
How about
<script type="text/javascript" src="http://example.com/yourscript.js"></script>
Where example.com is your site?
You would only have to
- make sure the JS is 100% contained in the external file
- make sure all image references in the Javascript use full URL's to the images, not relative paths.
Look at what Google and others are doing with JS - you could even pass parameters to your script and track usage, format sizes, etc. Think adSense. Same idea.
As for providing absolute URLs to the javascript and image files, as well as all of the html, I don't think that would work for the blogs. The interactive chart is made up of layers with absolute positions. I expect that the arrangement of the layers would be completely messed up if posted in a blog.
If I can't figure out how to do this with the html file, I'll have to recreate the chart in Flash. A lot of screwing around, but maybe that's the only way.
All I'm looking for is links, and I've created a unique bit of content to link to. Sheesh.
I tried the inline frames, but I probably didn't understand what I was doing, as it didn't work in either of the two blogs I tested in.
<IFRAME src="http://www.example.com/chart.html" width="1050" height="1050"
scrolling="auto" frameborder="1">
[Your user agent does not support frames or is currently configured
not to display frames. However, you may visit
<A href="http://www.example.com/chart.html">the related document.</A>]
</IFRAME>
Is there something more that I should be adding? Sorry to sound so stupid, but I'm not a coder.
what happens when you directly view http://www.example.com/chart.html in your browser?
what content-type header is returned when you request http://www.example.com/chart.html?
No, the code displayed in the blog is the Iframe code in my post above. There's no frames, no nothing. Just the lines of Iframe code.
The header for the real chart.html page is <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
Since I'm doing this to get links, blogs aren't the #1 venues I'd go after anyway. I'd much rather find an economics site whose owner is interested in providing the site's users with a link to the interactive chart.