/    Sign up×
Community /Pin to ProfileBookmark

Does Javascript run on server side?

Thank you Felgall for your kind reply. but I still cann’t 100% sure where the javaScript is running. So JavaScript is running on client side and never on server side. Is this true?
When a javasctrip file, say test.js is opend by a browser, server just send the whole file to client and client browser interpret javascript part. Am I right?
I created test.js on my localhost, but I can’t display it correctly by IE, nor by FixFox. Please help me out.

thank you in advance.

to post a comment
JavaScript

5 Comments(s)

Copy linkTweet thisAlerts:
@felgallApr 19.2007 — You don't need a server to run Javascript. The browser copies all of the files associated with the web page into the browser cache (if they are not already there) and then runs the code from there.

To work out why your code doesn't work I would need to see the code.
Copy linkTweet thisAlerts:
@wwwrabbitauthorApr 19.2007 — Thank you. here is code

<html>

<body>

My first text with JavaScript:

<script type="text/javascript">

document.write("Hello world!")

</script>

</body>

</html>

BTW, I search web. some says IE4 and later version support JavaScript. I confused.
Copy linkTweet thisAlerts:
@felgallApr 19.2007 — With that code saved as a web page (eg. in a file called hello.htm ) displaying that file in a browser will run the Javascript.

IE3 and Netscape 2 along with other browsers intended for use on computers created since then all suppurt Javascript. Exceptions tend to be either for handheld devices or are web readers that speak the content of the page rather than displaying it.
Copy linkTweet thisAlerts:
@wwwrabbitauthorApr 19.2007 — Thank you. How silly I am! please forget me. I'm newbie at Web develop. I have another silly question.

Is it posible that in one web page file, say test.asp, contains asp language which interpreted in server side and also contains JavaScript language which interpreted at Client side?

Thank you for your answer.

?
×

Success!

Help @wwwrabbit 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 5.8,
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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

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

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...