Software Archive
Read-only legacy content
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
17060 Discussions

Run a function when a new view (window) is loaded

Denis_L_
Beginner
783 Views

Hi, I am new in Intel XDK , and the version I am using is 1878. I am trying to fire a function when the system change page (new view show). I did try the following  code :

document.getElementById('agreementPage').addEventListener('panelload', function(){

alert("you're in agreementPage  view!");

}, false);

But this did not work. It’s look like the notion of panel is not used anymore, The system just hidden and show the div containing the information of the new view.

<div class="upage vertical-col hidden" id="mainpage">

<div class="upage vertical-col left " id="agreementPage">

I also did try to include a onpropertychange="functionOnShow()" tag to the div without success.

I will appreciate all advice.

Thank you

 

0 Kudos
2 Replies
Barry_Johnson
New Contributor I
783 Views

I am assuming you are using the Intel App Framework, but you don't mention which version you are using: 2.x or 3.x.

Please see this discussion thread from the App Framework section of the board which might be helpful.

0 Kudos
Denis_L_
Beginner
783 Views

Thanks a lot Barry, this discussion tread was very useful.... everything is in order now... Thanks again Denis

 

 

0 Kudos
Reply