Lack of scrollbars in an embedded URL

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
N0RMAN
New Member
New Member
Posts: 3
Joined: Thu Feb 26, 2015 3:28 pm

Lack of scrollbars in an embedded URL

Post by N0RMAN »

Hi all, first post as quite new to the site.

I have a family web site that contains a family history section. That section comprises over 10,000 pages. Obviously I cannot code that myself and use a genealogy program to generate the site. The generated site can be seen at http://www.law-family.org.uk/law_rowe/index.html.

I would like the section to be displayed within my family site and used the

Code: Select all

{embed url="law_rowe/index.html}
in the content page. I have used the necessary

Code: Select all

{embed header=true}
in the template and have NOT set a height with

Code: Select all

#myframe {height: 1000px; }
in the CSS.

The effect of this can be seen at http://www.law-family.org.uk/family-tre ... ilies.html

My problem is twofold.
  • The tree view (pedigree view) is wider than the frame
  • The list of names frame height is set by the initial number of names displayed and if you select a different initial the frame does not expand to fit the new required height
Both of these problems could be solved if the frame showed scrollbars. Is this possible?

Regards,
Norman
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3484
Joined: Mon Nov 28, 2011 9:29 am
Location: The Netherlands

Re: Lack of scrollbars in an embedded URL

Post by velden »

A little piece of jQuery code could fix this for you:

Code: Select all

$("#myframe").setAttribute('scrolling','yes')
Note that the id #myframe should match the id you use.

Wouldn't it be better to just take the iframe code and put that in the content of your page? If needed you can disable the wysiwyg editor for a specific page (options tab).
N0RMAN
New Member
New Member
Posts: 3
Joined: Thu Feb 26, 2015 3:28 pm

Re: Lack of scrollbars in an embedded URL

Post by N0RMAN »

Thanks for the reply velden. I have spent quite a while attempting to use your suggestion of putting the main page code directly into the content without much success.

The family tree site contains about 8 javascript files and 3 CSS files. I have added the script files to the template with the following code.

Code: Select all

<__script__ type="text/javascript" src="law_rowe/javascript/data_handler.js"></__script>
<__script__ type="text/javascript" src="law_rowe/javascript/family_class.js"></__script>
<__script__ type="text/javascript" src="law_rowe/javascript/global.js"></__script>
<__script__ type="text/javascript" src="law_rowe/javascript/groupsheet.js"></__script>
<__script__ type="text/javascript" src="law_rowe/javascript/helpers.js"></__script>
<__script__ type="text/javascript" src="law_rowe/javascript/individual.js"></__script>
<__script__ type="text/javascript" src="law_rowe/javascript/jquery.ba-hashchange.min.js"></__script>
<__script__ type="text/javascript" src="law_rowe/javascript/jquery.colorbox-min.js"></__script>
<__script__ type="text/javascript" src="law_rowe/javascript/jquery.cookie.js"></__script>
<__script__ type="text/javascript" src="law_rowe/javascript/jquery-1.7.2.min.js"></__script>
<__script__ type="text/javascript" src="law_rowe/javascript/name_index.js"></__script>
<__script__ type="text/javascript" src="law_rowe/javascript/pedigree.js"></__script>
<__script__ type="text/javascript" src="law_rowe/javascript/person_class.js"></__script>
and have created 3 new CSS files and applied them to the template.

This works to a degree but is not correctly formatted although, I'm sure, this can be solved. The main problem is that any link to another HTML page calls the pure HTML page outside of the CMS.

I'm afraid I don't know how to apply the jQuery code you suggest. Where is that code placed, one of the existing javascript files in "\lib\jquery\js"?
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3484
Joined: Mon Nov 28, 2011 9:29 am
Location: The Netherlands

Re: Lack of scrollbars in an embedded URL

Post by velden »

You're thinking too hard, keep it simple.

What I meant was in stead of using

{embed url="law_rowe/index.html}

construct that iframe manually.

If you use the {embed} tag and look in the html source of the webpage, you'll see that it outputs an iframe (iirc) with the attribute 'scrolling="no"'.

You could just copy that part in your cmsms page and change 'no' to 'yes'.

ps. never ever change files that come with the install of cmsms or a module. It should not be needed.
N0RMAN
New Member
New Member
Posts: 3
Joined: Thu Feb 26, 2015 3:28 pm

Re: Lack of scrollbars in an embedded URL

Post by N0RMAN »

Thanks again. The source code that creates the iframe has no reference to "scrolling" and it wasn't clear to me how to add to the jscript that creates the iframe with scrolling="yes" added.

I have approached it in a different way and removed the "embed" directive and added the following to the content of the page.

Code: Select all

<__iframe name="myframe" src="/law_rowe/index.html" scrolling="yes" width="915" height="745"></__iframe>
This has worked well but needs the height set as otherwise the frame is only about 200px high.

The result can be seen at http://www.law-family.org.uk/family-tre ... ilies.html

Do you think there is a way to have a variable height dependant on the content of the frame?
Post Reply

Return to “Layout and Design (CSS & HTML)”