[thelist] javascript / document.write / include javascript

Simon MacDonald simonmacdonald at uk2.net
Thu Aug 9 09:26:44 CDT 2012


you could use jquery to read the javascript file contents  and then output
the file code surrounded  by script tags - I think that is what you are
trying to do?

g-jquery  this just shows the read

there may be another better way but this springs to mind first off ;)

Shout again if you need further clarification


-----Original Message-----
From: thelist-bounces at lists.evolt.org
[mailto:thelist-bounces at lists.evolt.org] On Behalf Of Bob Meetin
Sent: 09 August 2012 14:23
To: thelist at lists.evolt.org
Subject: [thelist] javascript / document.write / include javascript

Is there a way to include a javascript document, i.e. javascript.js, within
a page if you are using javascript to define some matching criteria?

<script type="text/javascript">
   if( matches_some_mobile_criteria )
      document.write("<script type='text/javascript;

If I do it as above it outputs document.write, script type=, etc, rather
than including the .js file.


* * Please support the community that supports you.  * *

For unsubscribe and other options, including the Tip Harvester and archives
of thelist go to: http://lists.evolt.org Workers of the Web, evolt ! 

More information about the thelist mailing list