473,809 Members | 2,791 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

scrollbar to iframe through javascript.

hi all,

can any one tell me how will i set scrollbar to iframe throguh
javascript.
please help me asap.
thanks in advance
Jun 27 '08 #1
3 2654
On Apr 23, 5:03*am, Archana <trialproduct2. ..@yahoo.comwro te:
hi all,

can any one tell me how will i set scrollbar to iframe throguh
javascript.

please help me asap.

thanks in advance
1) Goto: google.com

2) Search: iframe scrollbars

3) Press Button: I'm feeling lucky

4) Profit!

-Tom Woz :)
Jun 27 '08 #2
On Apr 23, 10:49*pm, tomtom.wozn...@ gmail.com wrote:
On Apr 23, 5:03*am, Archana <trialproduct2. ..@yahoo.comwro te:
hi all,
can any one tell me how will i set scrollbar to iframe throguh
javascript.
please help me asap.
thanks in advance

1) Goto: google.com

2) Search: iframe scrollbars

3) Press Button: I'm feeling lucky

4) Profit!

-Tom Woz :)
hi,
thanks for reply
i think you are not getting what i want.

I want to enable/disbale scrollbar through javascript and not through
its style at runtime.

if you have any idea abt it then please help me asap

thanks in advance
Jun 27 '08 #3
Archana wrote:
>>can any one tell me how will i set scrollbar to iframe throguh
javascript.
[...]

I want to enable/disbale scrollbar through javascript and not through
its style at runtime.
Only Firefox knows the dynamic 'scrolling'-property for (i-)frames:

<iframe id="ifr"></iframe>
<input type="button" value="Enable scrollbars"
onClick="docume nt.getElementBy Id('ifr').scrol ling = 'yes';">
<input type="button" value="Disable scrollbars"
onClick="docume nt.getElementBy Id('ifr').scrol ling = 'no'; ">

But with a bit of creativity (requires a reload of the iframe):

<div id="ifrdiv">
<iframe></iframe>
</div>
<input type="button" value="Enable scrollbars"
onClick="docume nt.getElementBy Id('ifrdiv').in nerHTML =
'<iframe scrolling=yes></iframe>';">
<input type="button" value="Disable scrollbars"
onClick="docume nt.getElementBy Id('ifrdiv').in nerHTML =
'<iframe scrolling=no></iframe>';">

Hope this helps,

--
Bart
Jun 27 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
19724
by: David | last post by:
How do you turn an iframe scrollbar off, from within javascript, after the iframe has been loaded? In my example, the page with the iframe on it is initially set to scrolling=yes, however, I want to be able to set the scrollbar=no, through javascript.
1
2198
by: Kristian | last post by:
I'm including an application into a customer website using an iframe. Some of the pages have a scrollbar since their height expands the height of the iframe. My problem is, I need to resize the width of my layout if a page in the application uses a scrollbar, some of the pages show lists of search results so I do now know the pages the expand the iframe height up front. How can I detect if the scrollbars are showing inside me page?
2
6511
by: Per Jessen | last post by:
This is a javascript question, possibly somewhat inappropriate for this group, but here we go: (please redirect me to the right place to ask). In Microsoft Internet Explorer (5 and up) using Javascript how do I detect whether an IFRAME is displayed with or without a vertical scrollbar? The initial height of an IFRAME is fixed, so depending on the content, the browser will render it with a scrollbar or not. In Netscape et al. this is...
1
7102
by: deepika | last post by:
Hi, I have a datagrid with 200 rows and an iframe adjacent to it. When I click on the row, the details of that row show up in the iframe. Now suppose I click on the 150th row, the postback occurs and I lose the view of my selected row because the datagrid now has the scrollbar repositioned to the top,with datagrid showing the first 70 rows. How can I keep the scrollbar where it was before the postback so that the selected row(which in...
0
1470
by: onzinnig | last post by:
Hello, I have a problem where a frame does not repaint a part of a window when using the horizontal scrollbar. Easier then explaining is to try out the two html pages at the bottom of this question. After creating page 1.html and 2.html in root drive c:\ e.g. load 2.html in IE (6.0).
1
3289
by: Matt S | last post by:
I have an advertiser that delivers content in an iFrame. Because of space limitations on my page, I have set the height of the iFrame to be half that of it's contents. The problem is that the width of the iFrame is 960. That means the vertical scrollbar on the right side appears off screen for a lot of people. Is it possible for me to switch the scrollbar from the right side of the iFrame to the left side without having access to the...
1
5658
by: platoon1sc | last post by:
Hi guys.I have a problem with Internet Explorer in my web-application. I have a vertical scrollbar into my jsps but firefox show the vertical srollbar, but IE doesn't. IE show a blank space where vertical scrollbat must be there. Where the FF show de scrollbar, IE show blank space, but doesn't show the scroll. My css for the scrool is: #content { clear: left; height:100%; width:100%; margin:5px; }
0
926
by: AAaron123 | last post by:
hree questions. Number 3 is the tough one! { var htmlStyle = document.getElementsByTagName('html').style; var x = document.body.style; x.scrollbarShadowColor = htmlStyle.scrollbarShadowColor = "maroon" ....snip... The above script works but I have some questions:
1
1796
by: webdev1 | last post by:
Hi, I have set scrolling="auto" in my iframe, so when the height of iframe(Content) is more than the allocated height, vertical scrollbar appears.....Works perfect in Firefox, but when it comes to IE7, sometimes the vertical scrollbar appears when it is not necessary. I dont understand what is causing the problem. Thanks in advance..
0
9721
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9601
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10115
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9198
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7653
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6881
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4332
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3013
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.