iFrame scrollbar adjustment

Questions related to customising nuBuilder Forte with Javascript or PHP.

iFrame scrollbar adjustment

Postby Janusz » Mon May 27, 2019 8:04 am

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)
Janusz
 
Posts: 257
Joined: Fri Dec 28, 2018 10:11 pm
Location: Krakow, Poland

Re: iFrame scrollbar adjustment

Postby admin » Mon May 27, 2019 9:34 am

Janusz,

Can you post a picture?

Steven
admin
Site Admin
 
Posts: 3162
Joined: Mon Jun 15, 2009 9:53 am

Re: iFrame scrollbar adjustment

Postby Janusz » Mon May 27, 2019 1:59 pm

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.)
Janusz
 
Posts: 257
Joined: Fri Dec 28, 2018 10:11 pm
Location: Krakow, Poland

Re: iFrame scrollbar adjustment

Postby Janusz » Tue May 28, 2019 4:39 am

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?
Janusz
 
Posts: 257
Joined: Fri Dec 28, 2018 10:11 pm
Location: Krakow, Poland

Re: iFrame scrollbar adjustment

Postby kev1n » Tue May 28, 2019 6:47 am

This works for me when added to the main form's custom code.
Code: Select all
$("#FF_v1_iframe")[0].setAttribute("scrolling", "no");
kev1n
 
Posts: 359
Joined: Mon Oct 15, 2018 2:13 am

Re: iFrame scrollbar adjustment

Postby Janusz » Tue May 28, 2019 7:19 am

Yes, thanks a lot - works well.
Do you know maybe how to disable as well the scroll bars of the main window.
Janusz
 
Posts: 257
Joined: Fri Dec 28, 2018 10:11 pm
Location: Krakow, Poland

Re: iFrame scrollbar adjustment

Postby Janusz » Tue May 28, 2019 2:27 pm

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.
Janusz
 
Posts: 257
Joined: Fri Dec 28, 2018 10:11 pm
Location: Krakow, Poland


Return to Custom Code



cron