No one has responded to this discussion for at least a year, so this information may be out of date. If you're looking for information about this topic, please search for a more recent discussion or post a new question.

Iframe not scrolling to top

This question is answered This question is answered

I have an iframe on my webpage here:

 

http://www.mypcsolutions.biz/Pages/Calendar.aspx

 

After I scroll down and hit continue, the page doesn't scroll up to the top whern the next page loads in the iframe.

 

Any ideas?

Verified Answer
  • Iframe: "width=100%" means 100% of the containing element which Firefox will interpret correctly, IE will just guess. In this case the Paypal form is the containing element so if you give that a width it should fix it. Or specify the iframe width in pixels.

     

    Any javascript you add to a page will apply to the containing page, not the page in the iframe. So a scroll script should scroll the page you're on to the top. You can't inject anything into the iframed page so you'd have to be able to add the scroll script to the source page which I assume you can't. By default pages should open at the top when they load even in an iframe though.

All Replies
  • I don't see any of that:

    I don't see the Iframe (or what is in the iframe), scroll or continue?

  • Click register and go through the motions. You will see what I am talking bout .

  • A bigger issue might be In Firefox the right hand half of the page is blank so I can't click through anything.

     

    If you're looking to get the iframe to resize itself based on different content, that isn't possible.

  • I just saw that. Great, another thing to have to worry about.

  • Here is the code i have put on my page

    <form action=""><input type="image" style="display:none !important;" />

    <iframe src="a3.acteva.com/.../listCatalogEvents.action width="100%" height="100%" scrolling="no" frameborder="0" allowtransparency="true"></iframe>

    </form>

    I was told that if I put this in the header, that it would do the auto scroll to top...

    <body onload="top.scrollTo(0,0)">

    so I had to convert it to this:

    %3Cbody+onload%3D%22top.scrollTo(0%2C0)%22%3E

  • If I knew how to extract the navigation menu code from my Public Office 365 website, I could edit the CSS and HTML code on the event registration page so that it mimics my Office 365 public site's, I wouldn't have to fool with this.

  • Nevermind, I am just going to create a custom navigation menua nd use it for both.

    http://www.mycssmenu.com/

  • Iframe: "width=100%" means 100% of the containing element which Firefox will interpret correctly, IE will just guess. In this case the Paypal form is the containing element so if you give that a width it should fix it. Or specify the iframe width in pixels.

     

    Any javascript you add to a page will apply to the containing page, not the page in the iframe. So a scroll script should scroll the page you're on to the top. You can't inject anything into the iframed page so you'd have to be able to add the scroll script to the source page which I assume you can't. By default pages should open at the top when they load even in an iframe though.

  • Hello MyPC,

    This is Jason Burnside from Microsoft Office365 SharePoint Support.

    Thanks for coming to the communities with your concerns about customizing your website.

    Did you find WebBuilder and Mch’s information helpful?

    Unfortunately, our team does not support custom coding however you may call 1-800-Microsoft. There may be a consulting fee for this option.

    You may also check out the following links which may help you with your issue:

    SharePoint Online for Office 365: Developer Guide:
    http://www.microsoft.com/downloads/en/details.aspx?FamilyID=4387e030-73dc-48e7-ac95-abc043b9335a

    Office 365 Developer Training Course:
    http://msdn.microsoft.com/en-us/Office365TrainingCourse


    SharePoint Online for Office 365 Developer Guide:
    http://msdn.microsoft.com/en-us/library/hh147180.aspx

     

    Please let us know if this resolves your issue.

    I will continue to monitor this thread if you have any additional questions.

  • Why are my new posts being moderated? Is this Microsofts attempt to weed out those people that are asking to customize the Public Website so that we will be forced to contact microsoft's consulting services?

  • If you're seeing that your posts need approval, I think that's just a glitch in the forum software.
  • No, Try to send an image in a posting here and it almost aways states that your posting need approval. It has to do with this SPAMming that is going on here.
  • No problem posting an image here without approval:
  • That is just not fair!

    Maybe because you are one of those

    "Top contributors"

  • Ok, I may have written the wrong words when I started complaining about moderation.

    What I really meant to say was that as of today, whenever I post a NEW question I am getting the " this post will be approved after it has been approved by a moderater or somethign to that affect.

    This does not happen when I reply to a post.

    I mean, why are we moderating posts, why don;t they just stick to the Report Abuse link that is already all over this page?