Use PHP in javascript
#1

I have file in extand .js. And i need go to to my php file and do some things and then continious what is next in my .js file.
Reply
#2

I dont know much about JS, but i know that it is client-sided, and PHP is server-sided. This limits the possible communication between them, probably you can only do this by calling the php URL on the server from JS and parse the output.
Reply
#3

What this look in code?
Reply
#4

Use AJAX to handle the output of remote PHP scripts, process them, and give the required output(if any).
Reply
#5

or just add the <script></script> tags ...

It outputs html, html proccess js code between <script> tags then add the tags and it will proccess the javascript code ...

Works perfectly for me.
Reply
#6

You mean

function()
{
<script src="url"></script>
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)