Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
PHP Includes with javascript
Old 07-19-2007, 01:21 PM PHP Includes with javascript
John84's Avatar
Skilled Talker

Posts: 64
Name: John
Trades: 0
Hello,

I often use PHP includes on my sites. However, a site I am working on is on a server that does not have PHP capabilities. Is there a way to do what php includes does but using javascript?
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
John84 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-19-2007, 02:49 PM Re: PHP Includes with javascript
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
Not really...
Javascript is a process executed in the browser, PHP is a process executes on a server.

PHP can access files on the server, receive upload, connect to database, create or modify images.
Javascript cannot do any (or almost) of those.

I'd suggest you to get your site hosted on a server which include PHP.
Shouldn't be that hard...
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 07-25-2007, 01:40 AM Re: PHP Includes with javascript
Extreme Talker

Posts: 238
Location: United States
Trades: 0
I'm not sure exactly what you are asking here. If you are wanting to include other JavaScript files dynamically with JavaScript, then yes, it is possible.

Code:
var scriptSrc = 'example.js';
document.write('<script type="text/javascript" src="' + scriptSrc + '"></script>');
frost is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to PHP Includes with javascript
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.13437 seconds with 12 queries