Is there a way to include (in PHP) with javascript? - Printable Version -Shoutbox (https://shoutbox.menthix.net) +-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58) +--- Forum: Skype & Technology (/forumdisplay.php?fid=9) +---- Forum: Tech Talk (/forumdisplay.php?fid=17) +----- Thread: Is there a way to include (in PHP) with javascript? (/showthread.php?tid=26195) Is there a way to include (in PHP) with javascript? by Art Crazy on 05-27-2004 at 08:20 PM Is there a way to include something in a page like <?php include "bla";?> but in java script? RE: Is there a way to include (in PHP) with javascript? by Banks on 05-27-2004 at 08:31 PM include will take another file and basically act as if it was part of that page, so if you have a .js file yes, but i don't see why you wouldn't just use <script src=""> RE: Is there a way to include (in PHP) with javascript? by Art Crazy on 05-27-2004 at 08:33 PM
Sry but i know a little about coding. RE: Is there a way to include (in PHP) with javascript? by lhunath on 05-27-2004 at 08:37 PM
<script src="[uri-to-javascript-file]" /> RE: Is there a way to include (in PHP) with javascript? by Art Crazy on 05-27-2004 at 08:40 PM
Ok thanks, now could u help me making an php or shtml file with include for a file named news.php? RE: Is there a way to include (in PHP) with javascript? by lhunath on 05-27-2004 at 08:50 PM
quote:Mind asking what you want me to do rather than pointing at a library and asking me to get me 'that' book for you.... ? If you get what I mean =) Including is easy, as long as your server supports PHP. add <?php include "[uri-to-file]"; ?> in your document. Make sure it has the extension .php instead of .html or so.. and you're ready. (Mind, it'll only run on the server, if it supports PHP, it won't work in your own pc if you preview it without uploading..) RE: Is there a way to include (in PHP) with javascript? by lylesback2 on 05-27-2004 at 10:36 PM
<? RE: Is there a way to include (in PHP) with javascript? by Guido on 05-27-2004 at 10:54 PM
quote:Just to clarify, that's for the file where you place the include() code, the included file can be of any extension and it will be parsed as if it were a .php NO MATTER WHAT EXTENSION IT HAS. RE: Is there a way to include (in PHP) with javascript? by lizard.boy on 05-28-2004 at 01:21 AM exactly what guido said. i did this thing using dynamic css using an include and a file with css in it with variables lol. RE: Is there a way to include (in PHP) with javascript? by CookieRevised on 05-28-2004 at 10:08 AM
quote:Loose the "/" at the end, that is NOT valid html!!! That should only be used when you have a XHTML page... RE: Is there a way to include (in PHP) with javascript? by fluffy_lobster on 05-28-2004 at 02:03 PM Well you should be making your pages XHTML compatible anyway All the main web browsers support it. RE: Is there a way to include (in PHP) with javascript? by CookieRevised on 05-28-2004 at 03:13 PM
Who said that? It's not because (most) browsers support it, that you should use it... What is wrong with HTML? If you don't have a use for XHTML then why use it? XHTML is an extention to HTML... BTW, most pages I encountered on the web that claim to be XHTML don't even have a DTD specification and are just normal HTML pages (but with the error like /> in them)... So don't mix up standards RE: Is there a way to include (in PHP) with javascript? by fluffy_lobster on 05-28-2004 at 04:15 PM
From what I gather, there are various benefits of XHTML over HTML because it's an XML-compliant markup. The purpose of using XHTML over HTML isn't so much that it enhances the page at all but it allows browsers to move on with the knowledge that more sites are now using XHTML. Browsers would be a fair lot faster if they parsed only XHTML, not HTML RE: Is there a way to include (in PHP) with javascript? by WDZ on 05-28-2004 at 05:14 PM
XHTML is the future! quote: MyBB was originally not XHTML, and is in the process of being "upgraded." When I create new things, I use XHTML, and I check it with an XHTML validator. quote:That's shitty anyway... you should always close your tags if you want clean, professional code. |