View Full Version : scrollable content

07-21-2006, 07:16 PM
1) Script Title: scrollable content I/II

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex11/scrollc2.htm#

3) Describe problem:
Going to a page after a search at f.ex. Google, you see a horrible page, because the content of my site is in an <iframe>.

Is it possible to have a dynamic scrollable content in a script, with adjustable scrollbars (so not like the "scrollable content I", where there are bottom scrollbars), but still being on the same page, in the same script ? So that every link shows the total site.

- go to www.casariegoart.com
- go to www.casariegoart.com/currartEN.html

See the difference ? Can this be avoided ?

Thanks for any help (please note that I am no expert, so please do not throw any technical terms to me; I made my wife's site thanks to DD-scripts !!)


07-22-2006, 05:53 AM
I don't see any frame or iframe in the DD script you linked to in your post. I see the problem with your site, the way you have used the iframe. That is a problem with both frames and iframes, having nothing to do with the script you linked to.

There are ways of dealing with it:

1 ) Don't use any frames. A division with position relative, set dimensions and overflow auto can contain absolutely positioned content and this simulates an iframe's appearance.

2 ) Use somewhat involved scripting to cause your iframe's content pages to invoke the appropriate top page around themselves if they are navigated to separately. The disadvantage to this is that it won't work if javascript is disabled. Server side scripting might be able to do this though, without that drawback.

3 ) Provide a link on the content pages that allows the user to click it to get to the 'real page'. This can be positioned in a spot where it is not visible when the page is viewed through the iframe.

4 ) Set your meta data and robots.txt so that the pages that belong inside frames and iframes do not get spidered or catalogued by the search engines.

07-24-2006, 10:42 AM
To avoid the problem that a Google-found-link would go to a page that should be in a frame, the page should be redirected to f.ex. the index:

- place the following in every header:

"<script src="topwindow.js"></script> "

- save this as "topwindow.js"

if (top.frames.length == 0) {
ver = parseInt(navigator.appVersion, 10);
if ( ((navigator.appName == "Netscape") && (ver >= 3)) ||
((navigator.appName == "Microsoft Internet Explorer") && (ver >= 4)) )
location = "index.html";
// -->

Done !

07-24-2006, 02:04 PM
Not Done!

That is only part of the second approach I mentioned in my post. The disadvantages to this half way step are:

It will not work with javascript disabled.

It will not allow users to navigate to the content they selected on Google, only to your index page.

In addition to that, it isn't written as well as it could be but, that is of little matter in this case.

09-22-2006, 08:25 AM
Could you give me the code to do this, please :

"A division with position relative, set dimensions and overflow auto can contain absolutely positioned content and this simulates an iframe's appearance"