locked
How to load a page dynamically in pageviewer RRS feed

  • Question

  • Hi,

    I am trying to load different pages according to the choice user select from a drop downlist. If the user select google, in the pageviewer ,google is supposed to be loaded.,if yahoo is selected, yahoo page is loaded upon button click. Even I tried hiding and showing the pageviewer on button click, just for trial. The below code I have used

    $("div#(WebpartID)").hide()) and $("div#(WebpartID)").show()

    This is also not working. I am quite new to sharepoint and jquery. Please help.

    Many thanks

    Wednesday, May 29, 2013 2:56 PM

Answers

  • Hi,

    The PageViewer Webpart in the end is a iFrame.

    Hence if you want to invoke some functions on the window/page you need to use "parent." prefix. So that it'll execute at the page/window level.

    See following link: http://stackoverflow.com/questions/10774775/jquery-iframe-hide-show

    Hope It might help you.


    Please don't forget to 'mark answer/propose answer' or 'vote as helpful' as appropriate.




    • Edited by Mahesh.Nalam Wednesday, May 29, 2013 3:44 PM
    • Marked as answer by asterixtech Thursday, May 30, 2013 2:47 PM
    Wednesday, May 29, 2013 3:32 PM

All replies

  • Hi,

    The PageViewer Webpart in the end is a iFrame.

    Hence if you want to invoke some functions on the window/page you need to use "parent." prefix. So that it'll execute at the page/window level.

    See following link: http://stackoverflow.com/questions/10774775/jquery-iframe-hide-show

    Hope It might help you.


    Please don't forget to 'mark answer/propose answer' or 'vote as helpful' as appropriate.




    • Edited by Mahesh.Nalam Wednesday, May 29, 2013 3:44 PM
    • Marked as answer by asterixtech Thursday, May 30, 2013 2:47 PM
    Wednesday, May 29, 2013 3:32 PM
  • Thank you Mahesh, it was of great help.

    Thursday, May 30, 2013 2:47 PM