Software Archive
Read-only legacy content
17061 Diskussionen

iframe no intel xdk

lucas_s_3
Einsteiger
1.373Aufrufe

Bom dia queridos colegas.

Quando clico em determinado item do menu, preciso que abra um link no iframe do aplicativo. É possível? Como faço?

0 Kudos
1 Lösung
Diego_Calp
Geschätzter Beitragender I
1.373Aufrufe

Hello:

In your menu item event put this code:

$('#myIframeID').attr('src', 'http://www.google.com');

Regards

Diego

Lösung in ursprünglichem Beitrag anzeigen

9 Antworten
Diego_Calp
Geschätzter Beitragender I
1.374Aufrufe

Hello:

In your menu item event put this code:

$('#myIframeID').attr('src', 'http://www.google.com');

Regards

Diego

lucas_s_3
Einsteiger
1.373Aufrufe

Obrigado Diego.

Trabalho com javascript a mais de 5 anos, mas sempre utilizei a linguagem nativa, ou seja, o mesmo codigo que me forneceu eu faria desta forma: 

window.open('http://www.google.com.br', "corpo");

 

Posso utilizar assim, ou devo migrar para a forma que me passou?

Onde encontro conteúdo para estudar este framework? Qual o nome dele?

 

Obrigado pela atenção.

PaulF_IntelCorp
Mitarbeiter
1.373Aufrufe

Using the inAppBrowser plugin and use the API provided by it. You are not in a browser when you write a Cordova app, thus some of those things that work in a browser do not work in a webview. Your code is not associated with a server or a domain, which also causes some issues and confusion.

Diego_Calp
Geschätzter Beitragender I
1.373Aufrufe

Hi Lucas,

The codeI suggested is using jquery. To work with XDK you could use documentation about javascript, html5 and cordova for any aplication, and depending on your project settings, read about the framework you are using (don't know which one you selected, I suggest Bootstrap) and jquery if you are including it in your projects (XDK adds it automatically, but is optional).

Good luck,

Diego

PaulF_IntelCorp
Mitarbeiter
1.373Aufrufe

Paul F. (Intel) wrote:

Using the inAppBrowser plugin and use the API provided by it. You are not in a browser when you write a Cordova app, thus some of those things that work in a browser do not work in a webview. Your code is not associated with a server or a domain, which also causes some issues and confusion.

lucas s. wrote:

I understand, but where to find content to study?

Lucas -- Google is your best friend:

lucas_s_3
Einsteiger
1.373Aufrufe

Realizando os testes em SIMULATE, funcionou perfeitamente, porém quando gerei o APK e instalei em meu celular não abre o conteúdo no iframe, o que posso fazer?

PaulF_IntelCorp
Mitarbeiter
1.373Aufrufe

lucas s. wrote:

Performing tests in SIMULATE, it worked perfectly, but when generate the APK and installed on my mobile phone does not open the content in the iframe, what can I do?

Use the Debug tab to get the best debug environment.

lucas_s_3
Einsteiger
1.373Aufrufe
Bom dia, não consegui identificar o problema ainda, estou utilizando o script abaixo para abrir a página no iframe, funciona perfeitamente mas quando envio para o celular (APK) não funciona. window.open('http://www.google.com.br', "corpo");
lucas_s_3
Einsteiger
1.373Aufrufe

Realizei o teste usando a opção TEST do Intel XDK e transferi para o App Preview, funcionou 100%, mas quando realizo a instalação não funciona.

O nome do App na Play Store é: At the CLUB

Ficaria grato se alguém testasse e informasse o problema.

Antworten