Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

iFrame scrollbar adjustment

Questions related to customising nuBuilder Forte with JavaScript or PHP.
Post Reply
Janusz
nuBuilder Team
Posts: 506
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 8 times
Been thanked: 18 times

iFrame scrollbar adjustment

Unread post by Janusz »

Hi,
When I have the form inside the iFrame to avoid vertical scroll bar on left hand side I need to have iFrame much higher (ca 2cm) then the overall form hight.
Is there any possibility to reduce the required margin between the very bottom of the form and the iFrame- before the scroll show-up?
I need to compact some forms on the screen area and when I adjust the iFrame just to cover the form inside - I have the left side bar - and I would like to avoid it.

I was trying with someting like $('#FF_v1_iframe').css("overflow","hidden") - but did not manage to get expected result (on Chrome)
If you like nuBuilder, please leave a review on SourceForge
admin
Site Admin
Posts: 2815
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: iFrame scrollbar adjustment

Unread post by admin »

Janusz,

Can you post a picture?

Steven
Janusz
nuBuilder Team
Posts: 506
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 8 times
Been thanked: 18 times

Re: iFrame scrollbar adjustment

Unread post by Janusz »

Steven,
Please find enclosed short movie:

https://drive.google.com/open?id=1w1RMO ... xbBJcEJGhw

(scroll bar disapprears on the 4th setting. In fact I would like to NOT have it even on the first screen/setting.)
If you like nuBuilder, please leave a review on SourceForge
Janusz
nuBuilder Team
Posts: 506
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 8 times
Been thanked: 18 times

Re: iFrame scrollbar adjustment

Unread post by Janusz »

Hi,
If I add following code in the Setup/Header section

Code: Select all

<style>
html, body {
  overflow: hidden;
}
</style>
I have exactly the behaviour I want except one issue - for all iFrames and main page the scrolling is inactive - but I would like to exclude one iFrame from this seeting (to still have scrolling possibility for that particular iFrame) and do not have an idea how to do it?
Any suggestion?
If you like nuBuilder, please leave a review on SourceForge
kev1n
nuBuilder Team
Posts: 4305
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 446 times
Contact:

Re: iFrame scrollbar adjustment

Unread post by kev1n »

This works for me when added to the main form's custom code.

Code: Select all

$("#FF_v1_iframe")[0].setAttribute("scrolling", "no");
Janusz
nuBuilder Team
Posts: 506
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 8 times
Been thanked: 18 times

Re: iFrame scrollbar adjustment

Unread post by Janusz »

Yes, thanks a lot - works well.
Do you know maybe how to disable as well the scroll bars of the main window.
If you like nuBuilder, please leave a review on SourceForge
Janusz
nuBuilder Team
Posts: 506
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 8 times
Been thanked: 18 times

Re: iFrame scrollbar adjustment

Unread post by Janusz »

and additionally the following (in the same place as code from Kevin)

Code: Select all

document.body.style.overflow = 'hidden';
is switching off the scrolling in the main window.
If you like nuBuilder, please leave a review on SourceForge
Post Reply