Solved

quick & easy question about web scrpting

Posted on 2004-09-13
1
158 Views
Last Modified: 2010-04-06
Hi all,
  I learnt a bit of client side scripting(javascript), and then i noticed everybody was moving to server side scripts(php, perl etc). so i figured, why dont I.

I've started learning php(still in the basics) but i have one question that keeps bugging me...

Can Server-Side-scripting complety replace Client side??
Can i use php to do rollover effect... or can i use it to call a function after the page has loaded???

Adecold
0
Comment
Question by:adecold
1 Comment
 
LVL 15

Accepted Solution

by:
VincentPuglia earned 125 total points
ID: 12045192
quick answer: no
serverside scripting occurs on the server, which means the user never sees what goes on until you send it to the client.  And the server never knows what is going on at the client until there is a submission/request from the client.

So, a serverside image rollover would mean that the user would have to mouseover the image, a submission would have to be made, the server would have to rewrite & redisplay the page with the new image -- totally unacceptable in today's world.

serverside scripting is used primarily for database storage and security.

you can, however, use both php & javascript on your page -- javascript for image rollovers, non-critical code, etc.  and php for whatever else

Vinny
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now