Hide Page Header automatically invoked

Please post all questions on Help+Manual 8 here

Moderators: Alexander Halser, Tim Green

Post Reply
Ron Horn
Posts: 84
Joined: Tue Sep 10, 2019 10:47 pm

Hide Page Header automatically invoked

Unread post by Ron Horn »

When I load my generated Webhelp content into an iframe, the page header closes just after the page is loaded. Any thoughts on why that happens?

iframe_test.html

<iframe src="./index.html" style="height:100%; width:100%;" />

When I load iframe_test.html, the page header slides away.
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Hide Page Header automatically invoked

Unread post by Tim Green »

Hi Ron,

This is because you're using a V3 or V4 skin that automatically detects when it is being embedded and closes the header to make sure that users have enough space to see. It folds up with an animation so that the user sees it, so that they know that there is a header there that they can view if they want to. There isn't currently an option to disable this behavior, but I'm going to put it on the ToDo list. Even so, I would strongly recommend leaving it as it is: You have no way of knowing how big the user's monitor and browser window are going to be (think 12" laptops like the Microsoft Surface series), and if the header doesn't do the visible close on opening the user won't know that they can open and close it and will be stuck with a very small usable area.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Hide Page Header automatically invoked

Unread post by Tim Green »

Hi Ron,

If you want to disable it yourself you can. Edit the hm_webhelp.js file in the baggage and locate these lines of code:

Code: Select all

// Init for embedded WebHelp 
		function embedInit() {
			if (hmDevice.embedded && hmDevice.desktop) {
				if (hmpage.$headerbox.is(":visible"))
					hmWebHelp.pageDimensions.pageHeaderUpDown(true);
					$("p#ptopic_breadcrumbs").hide();
			}
Comment out the three lines after if (hmDevice.embedded && hmDevice.desktop) {, like this (/* marks the beginning of the comment, */ the end of it):

Code: Select all

// Init for embedded WebHelp 
		function embedInit() {
			if (hmDevice.embedded && hmDevice.desktop) {
				/*if (hmpage.$headerbox.is(":visible"))
					hmWebHelp.pageDimensions.pageHeaderUpDown(true);
					$("p#ptopic_breadcrumbs").hide();*/
			}
Again, you can do this, but I really don't recommend it. Especially not if you are using the embedded help features.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Ron Horn
Posts: 84
Joined: Tue Sep 10, 2019 10:47 pm

Re: Hide Page Header automatically invoked

Unread post by Ron Horn »

Thanks Tim! The 'iframe' we're loading the help in is 99% help content. So it doesn't take away much from the view. I'll pass along the code you provided to the dev team to consider.
Ron Horn
Posts: 84
Joined: Tue Sep 10, 2019 10:47 pm

Re: Hide Page Header automatically invoked

Unread post by Ron Horn »

Now I'm just noticing some extra space at the bottom. Is there a way to have H&M just fill the entire iframe it's in?

<iframe height="100%" width="100%" class="embed-responsive-item" src="./index.html"></iframe>
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Hide Page Header automatically invoked

Unread post by Tim Green »

Hi Ron,

You need to put the iFrame inside a DIV with an absolute or relative position. Apart from that, if you choose a skin that has a border or space at the bottom then that will be included. If you're using a V3 skin then choose one of the Minimalist skins. If you're using V4 then choose Modern Flexible or Modern Standard.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Ron Horn
Posts: 84
Joined: Tue Sep 10, 2019 10:47 pm

Re: Hide Page Header automatically invoked

Unread post by Ron Horn »

Thanks. I'll share that with the web team. I'm using a V4 skin that renders and fills perfectly in it's native view from the generated code.
Post Reply