Source language: Translate to:

Application getting data from the web

General questions about NeoBook

Moderator: Neosoft Support

Application getting data from the web

Postby shx » Thu Jun 26, 2014 7:19 am

Hello,

Let me explain when I'm trying to do.

I have my application running on a bunch of different customers. There is data that changes often that I need to supply those applications with.

It is not going to be initiated by the user but rather the application itself should gather the data.
I don't want to do some sort of an FTP download or something similar because I think the user might be requested by the firewall to first okay this access and it would be confusing to them.

So I am looking for reactions for the following idea.

I'm going to have a webpage that will contain this information in hidden objects. Within that webpage I will have a JavaScript that will execute an capture all the data that I need from those hidden objects and as a last step pass it to a Neobook variable.

the JavaScript code in the webpage looks little like this

var elements = document.getElementsByName ("dataineed");
for (var i=0; i < elements.length; i++) {
var toneob = toneob.concat( "--" + elements[i].value );
}
window.external.nbSetVar( '[xxtoneob]', toneob );

I'm going to navigate to that webpage and will be integrated within the application.

any thoughts?
- Steven
User avatar
shx
 
Posts: 167
Joined: Sun Apr 03, 2005 5:49 am

Re: Application getting data from the web

Postby shx » Thu Jun 26, 2014 7:36 am

I guess to clarify what I am asking is the following

does having this
Code: Select all
window.external.nbSetVar( '[xxtoneob]', toneob );

in the javascript mean that this is called active scripting and it would not work in all cases.

Is there another way of getting at this data that would be more standard?
- Steven
User avatar
shx
 
Posts: 167
Joined: Sun Apr 03, 2005 5:49 am

Re: Application getting data from the web

Postby Gaev » Thu Jun 26, 2014 7:58 am

Steven:
does having this

window.external.nbSetVar( '[xxtoneob]', toneob );

in the javascript mean that this is called active scripting and it would not work in all cases.

Not sure what you mean by "active scripting" ... but if you are concerned that having the built-in javascript auto-execute when the web page is loaded ... as implied by ...
Within that webpage I will have a JavaScript that will execute an capture all the data that I need from those hidden objects and as a last step pass it to a Neobook variable.

... then you can get around it by ...

a) leaving it out of the html file

b) doing a BrowserExecScript in the Web Browser object's Navigate Complete event section


If this is not the issue/concern, please clarify what you mean.
User avatar
Gaev
 
Posts: 3716
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: Application getting data from the web

Postby shx » Thu Jun 26, 2014 8:52 am

by active scripting I mean from wikipedia
Active Scripting (formerly known as ActiveX Scripting) is the technology used in Windows to implement component-based scripting support.


here is an example of what I mean the title of the following web page.
Adjust Internet Explorer active scripting settings
http://windows.microsoft.com/en-us/windows/help/genuine/ie-active-script



If this is not the issue/concern, please clarify what you mean.

I do want it to execute automatically. I am just concern because in the help file it says by nbGetVar, nbSetVar
Note: These features require the user's Internet Security/Active Scripting option to be enabled.

so I want to know if this will cause me problems.
- Steven
User avatar
shx
 
Posts: 167
Joined: Sun Apr 03, 2005 5:49 am

Re: Application getting data from the web

Postby Neosoft Support » Fri Jun 27, 2014 9:56 am

You shouldn't need to worry about Active Scripting being enabled or not - just JavaScript. Although, JavaScript can be disabled by the user, that's unlikely since JavaScript is required by many websites. However, you may find that some firewalls will alert the user when your pub attempt to connect to the Internet through the browser too.

Another option would be to use a PHP script to generate the data you want to send to your pub and use the InternetGet action to retrieve it. This may still trigger a warning from the firewall, but it's somewhat simpler than dealing with JavaScript.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5593
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Re: Application getting data from the web

Postby shx » Fri Jun 27, 2014 10:35 am

Thanks Dave for your response.

I like the InternetGet suggestion that you made and will look into it.
- Steven
User avatar
shx
 
Posts: 167
Joined: Sun Apr 03, 2005 5:49 am

Re: Application getting data from the web

Postby shx » Fri Jun 27, 2014 11:40 am

Just a general question about using the Internet get action with PHP.

Is the PHP sending the data via echo or print command or is there another way?


Thanks
- Steven
User avatar
shx
 
Posts: 167
Joined: Sun Apr 03, 2005 5:49 am

Re: Application getting data from the web

Postby dec » Fri Jun 27, 2014 11:52 am

Hello,

Everything you print out in PHP (using echo or other) are considered the HTTP body response and be sending to the user. You also can set HTTP headers with PHP which can be read by the client too.
.
Enhance your NeoBook applications!
.
57 plugins, 1113 actions and 230 samples
.
NeoPlugins website: www.neoplugins.com
.
User avatar
dec
 
Posts: 1663
Joined: Wed Nov 16, 2005 12:48 am
Location: Spain

Re: Application getting data from the web

Postby shx » Fri Jun 27, 2014 1:49 pm

thanks
- Steven
User avatar
shx
 
Posts: 167
Joined: Sun Apr 03, 2005 5:49 am


Return to General NeoBook Discussions

Who is online

Users browsing this forum: No registered users and 1 guest

cron