Unstoppable Domains โ€” AI Assistant

Javascript / PHP Question

SpaceshipSpaceship
Watch

Zubair1

Established Member
Impact
50
Hi,

ppl, I was just wondering I know that I can generate a javascript from
within php and vise versa but when I generate a php command from
javascript it just shows plain text it does'nt do anything besides that
what is reason it does that ? I just want to know a method so people
won't have to refresh their pages to see the contents change.
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
You can echo() JS in PHP, but JS will NOT run PHP, because only HTML or other scripting languages (server-side) can run PHP... there's always exceptions, but the main reason is that JS is client-side.
 
0
•••
then can I write in php code in a server side language and make it run?
cause I'm trying to find out a way so people won't have to refresh their contents.
 
0
•••
html is not dynamic. changes are only registered when a page is loaded or refreshed.

only way for a page to change after its loaded is by using java script

oh and php is a server side language
 
0
•••
I think you don't understand me what im trying to say is that i know html is a static
language i know all about what language is what kind I also know that java scripting
is a client side language and only way to change a page's contents is through javascript what i wanted to ask is can i give javascript the contents of php example would be :

<script language="JavaScript" type="text/javascript">
id.innerHTML = "<?php // put a funtion where which return the number of user
onlin?>";
</script>
 
0
•••
CatchedCatched
Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomainEasy โ€” Payment Flexibility
DomDB
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back