473,569 Members | 2,598 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

scrollIntoView( ) within an iframe

49 New Member
I have an iframe within a page, and i want a div in that frame to scroll to the top of just that frame when a link is clicked upon (so only the page in that frame should scroll up/down, and not the mother page containing the iframe). However, document.all.di vID.scrollIntoV iew() is scrolling the entire page in the window to the top so as to put the div at the top, and not just the page in the iframe.

So first the page in the iframe scrolls up/down to put the div at the top of that iframe, and then the mother page itself scrolls up/down so that the iframe is at the top of the window, with the div at the top of the iframe.

Can someone help me handle this? Thanks a lot in advance!
Oct 25 '08 #1
1 5071
acoder
16,027 Recognized Expert Moderator MVP
Have you a link, or could you post some code?

Note that document.all won't work in most browsers. Use document.getEle mentById() to reference an element.
Oct 26 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
7728
by: cmay | last post by:
I am trying to use scrollIntoView to programatically scroll an area on one of my pages. It wors just like you would expect it to when the page itself doesn't have any scrolling (the page is smaller than the browser window). However, as soon as you introduce the same code on a page that has a vertical scrollbar, the scrollIntoView causes...
1
4294
by: Steve Murphy | last post by:
Do .scrollIntoView, .focus, and .select work in Safari, or am I just doing something wrong. The following code works in Firefox, Netscape, and IE on both Mac and Windows, but fails on Safari: tempobj = this.elements; tempobj.scrollIntoView(); tempobj.focus(); tempobj.select();
0
1704
by: Larry Brown | last post by:
Hi, I'm working on an ASP.NET 2 application, with framework 2.0 beta. I have a classic form, with a listbox. This field is in autopostback=true. When I change the selected value, the page is reloaded, and the scrollIntoView function is called at reload. It is called in the Webform_Autofocus(focusId) function, whose call is included by...
13
6675
by: ukrbend | last post by:
I'm new to Javascript and to html and am trying to make the following code snippet work but it doesn't. It refuses to call the getPage() function and I always get a 404 error. I know the code is getting as far as the iframe section as other parts of the html code work correctly. But it is not executing any code within the getPage() function...
1
10220
by: Jim Satterfield | last post by:
I've looked and looked and can't find any solution or even mention of this problem so I'll see if I can find anyone through this group who might have an idea. I've inherited the job of webmaster for my company. After downloading Firefox 1.5 I started going through the site and found a section that didn't work in Firefox but works just fine in...
2
2329
by: Jon | last post by:
All, I'm currently working with a PHP-based CMS application, and am begining to put the finishing touches on it via Javascript validation. Currently, I'm using fairly standard methods of validation of each form field, the algorithm is much like: if(document.formName.field.value == ""){ //throw an error and return false }
0
3231
by: Ben Fidge | last post by:
Hi I've got a situation where I need to direct a Response.Redirect to a new window from within a page embedded within an IFrame. Currently, we have a page embedded within an IFrame that presents a list of items to the user in a drop-down list. According the the item selected, one of two things can happen when they click on a button next...
3
2831
by: sylver | last post by:
Hi to all, I found out the you can use the scrollIntoView() method, to scroll an element (ie: a <divwith lots of content that it overflows) to its bottom / last line. But this only happens in IE. Does mozilla have any methods that do the same? Or is there any hacks algo we can try to perform this for Mozilla? ref:...
0
1495
by: johnw182 | last post by:
Ok, I have a asp.net project. Everything works great. HOWEVER, this project was made to be called from within a frame or iframe. When being used within the iframe the user gets a blank frame when clicking certian buttons. Here is the code for the iframe. <iframe src="http://www.website.com/?cid=A195E1A9-A5D7-4046-89A4-1C00D4F81E35"...
0
7614
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...
0
7924
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8125
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7676
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7974
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...
1
5513
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...
0
5219
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...
1
1221
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
938
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...

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.