none
Scroll Problem with Page Viewer Web Part

    Question

  • Hi All,

    I have written two Custom Application Pages Form1.aspx and Form2.aspx

    Form1.aspx is twice as long as Form2.aspx in its layout.

    I am using an OOTB Page viewer web part to display the Form1. The click of submit button at the end of Form1.aspx loads Form2.aspx into the Page Viewer web part. The issue i am facing is that the Scroll position is maintained. (The scroll is of the actuall page on which the Page viewer resides). I have increased the length of the Page Viewer to the length of Form1, so when the From2 loads it appears blank. The user has to scroll up to see the content in Form2.aspx.

    I tried setting the default focus to a control on the top of Form2.aspx and also using javascript in the Onload of form2 to scroll up the Page. But does not seem to work.

    Any thoughts

    Thanks in Advance

    pv
    Friday, October 10, 2008 10:28 AM

Answers

  • Try parent.window.scroll(0,0); on clientclick of the submit button in form1.aspx
    • Marked as answer by prasvi Monday, October 13, 2008 9:43 AM
    Monday, October 13, 2008 5:19 AM

All replies

  • Try parent.window.scroll(0,0); on clientclick of the submit button in form1.aspx
    • Marked as answer by prasvi Monday, October 13, 2008 9:43 AM
    Monday, October 13, 2008 5:19 AM
  • Thanks Remya, that worked fine.
    I was not aware that Page Viewers are implemented as iFrames.
    pv
    Monday, October 13, 2008 9:43 AM