/    Sign up×
Community /Pin to ProfileBookmark

Hello.
I know that js is a client-side web programming language.
I can not understand what it means except that the client-side code executes on the client machine, that is, locally in the browser.
What I can not figure out which is the basis without which it is not clear to me is like ajax data are passed from server to client and more precisely from the server to js.
I saw that to manage your images in js is the class image that “receives” the data from the server and can ‘have many properties.
What I want is to pass a xml file to the client with js and in js and do pharsing in js without embed the data in the html page with a server-side language ? how?

thanks.

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@KorMar 24.2011 — Hello.

I know that js is a client-side web programming language.

I can not understand what it means except that the client-side code executes on the client machine, that is, locally in the browser.
[/quote]

That is exactly what it means. Nothing more ?. The browser is instructed by construction (within the so called interpreter) to recognize the language and to run its codes. JavaScript is an interpreted language, not a complied one. That means the instructions are executed in run-time by the interpreter. They are [I]not[/I] packed in a machine code in order to be sent to the CPU. Well, most of them, because, as many other languages, JavaScript might use sequences of just-in-time-compilation, but this is another discussion.


What I can not figure out which is the basis without which it is not clear to me is like ajax data are passed from server to client and more precisely from the server to js.
[/quote]


Well, AJAX is able to do exactly what a classical submit action can do. Except that AJAX is able to do that without changing the session.

AJAX is a technique to transfer data [I]within the same domain[/I]. The core of AJAX is the request object: XMLHttpRequest(). It is able to carry a query to another file and to get a response (if any) from there. The response is handled further by the JavaScript codes which might change dynamically something on the document.

What I want is to pass a xml file to the client with js and in js and do pharsing in js without embed the data in the html page with a server-side language ? how?

thanks.[/QUOTE]


It is not clear what do you mean by "I want is to pass a xml file to the client". I? Who is that "I"? You? ? And what (or who) is the "client"? Where is that XML file? Who's gonna send it and who's gonna receive it?
×

Success!

Help @giuseppe500 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...