Frage

I have an app with tabs across the bottom. When a tab is selected I would like to display an external webpage in the app, for example Google.

Upon searching found some stuff for calling with AJAX and some iframe stuff. Is there really no way to just embed the external webpage into the panel? Am I missing something?

War es hilfreich?

Lösung

There are more elegant ways to do this, and its a little hard working out which would be best as there isn't much detail regarding your set-up and what you're after.

A simple way would be to simply intercept the click event of the tab and then change the panel's html to whatever you so desire, e.g.

listeners:{
 click:function(){
    myPanel.html="<iframe src='http://www.google.com'></iframe>";
 }
}

You could also include a check for which tab is being clicked then change the called URL as a result...

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top