Source language: Translate to:

is there any Web viewer?

General questions about NeoAppBuilder - our rapid application development tool for building HTML5, web and mobile apps.

Moderator: Neosoft Support

is there any Web viewer?

Postby smmsamm » Sat Jan 24, 2015 11:49 am

I want to show some jquery external html files, what is the best way?
smmsamm
 
Posts: 24
Joined: Sun Jun 15, 2008 11:25 am

Re: is there any Web viewer?

Postby Gaev » Sat Jan 24, 2015 4:47 pm

smmsamm:

I want to show some jquery external html files, what is the best way?

Not sure what you mean by "show some jquery external html files" ... if you meant "some external html files using jQuery commands/methods" ... you can use jQuery's .load() method ... but as documented here ... http://api.jquery.com/load/ ... you will need to address this ...

Due to browser security restrictions, most "Ajax" requests are subject to the same origin policy; the request can not successfully retrieve data from a different domain, subdomain, port, or protocol.


Perhaps, you can get around this restriction by using jQuery's .get() method ... and then load the returned html/text into the Container object.


You might also be able to setup html for an < iframe > inside the container object ... although I haven't investigated how one would replace the url of content being displayed while the App is running.
User avatar
Gaev
 
Posts: 3718
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: is there any Web viewer?

Postby Gaev » Sat Jan 24, 2015 5:49 pm

Update ...

I placed this as the content of the Container object (i.e. Container1.html) ...
Code: Select all
<iframe src='http://www.scriptedlogic.com/zzold/index.htm'  width='700' height='300'></iframe>

... and it displayed the home page of my old website.

I then set the content of the Container object to [thisHTML] ... and attached this to a Button's click event ...
Code: Select all
SetVar [thisHTML] "<iframe src='http://www.scriptedlogic.com/zzold/products_TicTac.htm'  width='700' height='300'></iframe>"

BeginJS
$('#Container1').html($rootScope.thisHTML);
EndJS

... the new page was rendered in the Container object
User avatar
Gaev
 
Posts: 3718
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada


Return to General NeoAppBuilder Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron