Newbie Question
Moderator: General Moderators
Newbie Question
I was wondering if there could be a way, PHP preferably, to have a javascript execute and to obtain the html from that rendering and placing that html onto a page. I have tried to read from a file, but of course it has been giving me the exact code(javascript) of the page. Any ideas, suggestions, etc. would be helpful.
-
Illusionist
- Forum Regular
- Posts: 903
- Joined: Mon Jan 12, 2004 9:32 pm
Ok. Here is a sequence of events that I would think could work, it is just that I don't know how to do it. Maybe somebody could help:
1. Someone visits a webpage
2. This site has a javascript that generates a table
3. The javascripts executes possibly elsewhere in a php file
4. The html generated by the javascript is passed from elsewhere and included into the page that the user is looking at.
Thus, in the source we have the html version of the code.
1. Someone visits a webpage
2. This site has a javascript that generates a table
3. The javascripts executes possibly elsewhere in a php file
4. The html generated by the javascript is passed from elsewhere and included into the page that the user is looking at.
Thus, in the source we have the html version of the code.
-
Illusionist
- Forum Regular
- Posts: 903
- Joined: Mon Jan 12, 2004 9:32 pm
ok, so like put your javascript in a PHP page, and then use the include() and include taht php page where ever you need...
Code: Select all
include("javascripts.php");- Ixplodestuff8
- Forum Commoner
- Posts: 60
- Joined: Mon Feb 09, 2004 8:17 pm
- Location: Queens, New York
Javascript is a client-side language, you can't hide it normaly. I did a google search for "server side javascript" and got some results, look into it.
-
Illusionist
- Forum Regular
- Posts: 903
- Joined: Mon Jan 12, 2004 9:32 pm
-
d3ad1ysp0rk
- Forum Donator
- Posts: 1661
- Joined: Mon Oct 20, 2003 8:31 pm
- Location: Maine, USA