Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
simple Javascript code runs at clientside or serverside?
Posted 1-Nov-12 1:03am
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

normally JS runs on the client side(browsers) only.
Developer can also write event driven code on JS which can be execute some function on event and can be run on some engine like V8
http://code.google.com/p/v8/[^]
 
so there are some JS which we can say server side JS like node.js which using V8 engine(same engine use by chrome) for more reference :
 
http://en.wikipedia.org/wiki/JavaScript[^]
  Permalink  
Comments
Aarti Meswania at 1-Nov-12 6:19am
   
thank you,
For clear my confusion
:)
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

Javascript code runs at clientside only. it mainly useful to validate client side validations.
 
http://www.w3schools.com/js/default.asp[^]
  Permalink  
Comments
Aarti Meswania at 1-Nov-12 6:19am
   
thank you,
For clear my confusion
:)
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Hey Aarti,
 
Javascript is kind of interpreted language, which is emited from server along with HTML and CSS. It runs on client side.
All browser has functionality by which it can understand the language.
 
<script> tag in the HTML tells the browser that the next statemenet are script code rather than normal HTML until it hits </script>.
 
For more details, you can check "Head First Javascript" or try www.w3schools.com/js/default.asp[^]
 
Hope that helps.
Milind
  Permalink  
Comments
Aarti Meswania at 1-Nov-12 6:19am
   
thank you,
For clear my confusion
:)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 341
1 Marcin Kozub 225
2 Sergey Alexandrovich Kryukov 220
3 Praneet Nadkar 197
4 Shweta N Mishra 161
0 OriginalGriff 8,149
1 Sergey Alexandrovich Kryukov 7,287
2 DamithSL 5,614
3 Manas Bhardwaj 4,986
4 Maciej Los 4,910


Advertise | Privacy | Mobile
Web02 | 2.8.1411023.1 | Last Updated 1 Nov 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100