Application getting data from the web

General questions about NeoBook

Moderator: Neosoft Support

Locked
User avatar
shx
Posts: 167
Joined: Sun Apr 03, 2005 5:49 am

Application getting data from the web

Post by shx »

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.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

Post by shx »

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
Gaev
Posts: 3782
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada
Contact:

Re: Application getting data from the web

Post by Gaev »

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
shx
Posts: 167
Joined: Sun Apr 03, 2005 5:49 am

Re: Application getting data from the web

Post by shx »

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/wind ... ive-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
Neosoft Support
NeoSoft Team
Posts: 5628
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA
Contact:

Re: Application getting data from the web

Post by Neosoft Support »

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
User avatar
shx
Posts: 167
Joined: Sun Apr 03, 2005 5:49 am

Re: Application getting data from the web

Post by shx »

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

Post by shx »

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
dec
Posts: 1663
Joined: Wed Nov 16, 2005 12:48 am
Location: Spain
Contact:

Re: Application getting data from the web

Post by dec »

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!
.
58 plugins, 1131 actions and 233 samples
.
NeoPlugins website: www.neoplugins.com
.
User avatar
shx
Posts: 167
Joined: Sun Apr 03, 2005 5:49 am

Re: Application getting data from the web

Post by shx »

thanks
- Steven
Locked