Software Archive
Read-only legacy content
17061 Discussions

iframe no intel xdk

lucas_s_3
Beginner
526 Views

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 Solution
Diego_Calp
Valued Contributor I
526 Views

Hello:

In your menu item event put this code:

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

Regards

Diego

View solution in original post

0 Kudos
9 Replies
Diego_Calp
Valued Contributor I
527 Views

Hello:

In your menu item event put this code:

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

Regards

Diego

0 Kudos
lucas_s_3
Beginner
526 Views

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.

0 Kudos
PaulF_IntelCorp
Employee
526 Views

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.

0 Kudos
Diego_Calp
Valued Contributor I
526 Views

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

0 Kudos
PaulF_IntelCorp
Employee
526 Views

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:

0 Kudos
lucas_s_3
Beginner
526 Views

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?

0 Kudos
PaulF_IntelCorp
Employee
526 Views

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.

0 Kudos
lucas_s_3
Beginner
526 Views
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");
0 Kudos
lucas_s_3
Beginner
526 Views

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.

0 Kudos
Reply