Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

document.write("<?php ..

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

document.write("<?php ..

Postby jennifer » Wed Apr 09, 2003 8:19 am

how can i make javascript write a php page?

document.write("<?php .... doesn't work. why not?
jennifer
New php-forum User
New php-forum User
 
Posts: 2
Joined: Sat Apr 05, 2003 11:39 am
Location: Helena, MT

Postby liquedus » Wed Apr 09, 2003 9:58 am

correct me if im wrong but since javascript is client side and php is server side.... it wont since the page has been already parsed server side... but you could probably write javascript with php.
liquedus
php-forum Active User
php-forum Active User
 
Posts: 266
Joined: Tue Apr 08, 2003 5:18 am
Location: Ottawa, Canada

Server first and then client

Postby ruturajv » Thu Apr 10, 2003 4:34 am

Javascript scripts run at client commonly unless specified to run at server, hence after executing the script a new code can't be written and if written that page needs to be executed by the server, the page which is on client where the new script is written can't be executed by the server
User avatar
ruturajv
php-forum Super User
php-forum Super User
 
Posts: 1280
Joined: Sat Mar 22, 2003 9:42 am
Location: Mumbai, India

Postby liquedus » Sun Apr 20, 2003 5:55 am

putting the php code into an variable doesnt make a difference, javascript is processed client side AFTER php is processed server side which is sent to client as HTML
liquedus
php-forum Active User
php-forum Active User
 
Posts: 266
Joined: Tue Apr 08, 2003 5:18 am
Location: Ottawa, Canada


Return to PHP coding => General

Who is online

Users browsing this forum: Exabot [Bot] and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.