HOME       >>       Programming

Javascript Or Css And Php? For visual effects on a site.


drk002

For a few years till now, DHTML and Javascripts reigned the industry when it comes to any visual effect on a website like link-mouseover, pop-up, scrolling etc. There are lots of sites offerring these scripts for free for readymade use on personal sites. As all the above can be done today with php and css, can someone tell me whether Javascript is worth using for these perpose any more?


rvalkass

I would try and avoid using JavaScript at all costs, simply because more and more people are actually turning it off now, so anything you code with it will not appear to some people. As PHP is a server-side script it will just output HTML to the browser, which obviously all are compatable with. CSS can have a few quirks and oddities between browsers, but nowhere near as many as you get using JS. JavaScript is certainly not worth using, in my opinion, unless you really have to.


masterleous

php can't use for styling purpose, CSS, DHTML, JavaScript are the only way to style your webpages...............PHP is a server side language use only to hide your code from other user..........and also it is very powerfull and you can make so many fuctions with powerfull commands


electriic ink

One of the main things I find myself using javascript for is its innerHTML function (or any other script which swaps the value of a tag on a webpage). Avoidable but undoubtedly useful.

 

The following reasons are why javascript still haunts the net:

Newbs who find themselves at bravenet are swarmed with this mass of unnecessary yet "great" javascripts. Surely anything which looks that compucated must be good.

Old sites, which are often the popular ones used to have to do advanced things with javascript because there wasn't any other choice. There is little need to "upgrade" the site so that it uses server sided scripting as most browsers still support javascript

People who use free hosting without server sided scripting

Anyway, no server sided script could replace every javascript function because javascript runs at the client and the server sided scripts at the server so javascript will always be able to do stuff server sided scripts cannot.

 

With regards to javascript vs css, although css can do rollovers (like javascript's onMouseOver), I don't see css having:

onChange

onMouseWheel

etc....

That's all I can name off-hand but there must be more things it can't do and therefore many more arguements.

 

The net is still a bit javascript dependant which is why most browsers still support it and it doesn't look at though it's going to be out of use for visual effects or anything else anytime soon because it still has its importance.



VIEW DESKTOP VERSION REGISTERGET FREE HOSTING

Xisto.com offers Free Web Hosting to its Members for their participation in this Community. We moderate all content posted here but we cannot warrant full correctness of all content. While using this site, you agree to have read and accepted our terms of use, cookie and privacy policy. Copyright 2001-2019 by Xisto Corporation. All Rights Reserved.