Jump to content
xisto Community
Sign in to follow this  
drk002

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

Recommended Posts

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?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.