LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-04-2004, 09:01 PM   #1
ElementNine
Member
 
Registered: Sep 2003
Distribution: Red Hat 9 or Gentoo 1.4 whatever I can get to work first
Posts: 105

Rep: Reputation: 15
PHP and or Javascript Can they be used the same way?


I noticed with javascript you can do things after the page has been rendered ie: making divs visible, rollovers, dropdowns. I was wondering is there a way to do this with php like if someone clicks a button you can have text or something appear, or do i have to use javascript for that?
 
Old 03-05-2004, 08:22 AM   #2
deiussum
Member
 
Registered: Aug 2003
Location: Santa Clara, CA
Distribution: Slackware
Posts: 895

Rep: Reputation: 32
Nope. PHP is a server-side script, and JavaScript is usually a client-side script. Which means, PHP runs on the server before it sends any information to the client, and the JavaScript runs on the client after it has received it's information from the server. PHP code isn't actually sent to the client, only the results of the executed PHP code are sent.

Although... you can have PHP that creates JavaScript that creates HTML...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP,JAVASCRIPT and CheckBox aznita Programming 2 06-17-2005 04:33 AM
Can I use PHP variables in javascript? nickiv Programming 1 06-07-2005 05:41 AM
JavaScript & PHP Gerardoj Programming 1 06-11-2004 12:02 AM
PHP and JavaScript Gerardoj Programming 4 04-22-2004 02:02 PM
Executing Javascript within a PHP page Linh Programming 3 09-26-2003 05:08 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration