[thelist] javascript / document.write / include javascript

erik mattheis gozz at gozz.com
Thu Aug 9 11:28:15 CDT 2012


That way it will be sure to work in IE4! </snark>

On Thu, Aug 9, 2012 at 11:18 AM, Bob Meetin <bobm at dottedi.biz> wrote:

> Thanks Brian and everyone,
>
> I googled first to get some background, but yes this worked as:
>
>      document.write("<SCR"+"ipt src='$path/the_javascript_**
> file.js'><\/SCR"+"ipt>");
>
> -Bob
>
>
> On 08/09/2012 07:33 AM, Brian Cummiskey wrote:
>
>> Hey Bob,
>> you'll need to split the keyword, ie,
>>
>> document.write("<scr"+"ipt type .....
>>
>> you've probably seen this 100 times before and never realized why :)
>>
>>
>> On Thu, Aug 9, 2012 at 9:23 AM, Bob Meetin <bobm at dottedi.biz> wrote:
>>
>>> 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;
>>> src='javascript.js'></script>"**);
>>>    }
>>> </script>
>>>
>>> If I do it as above it outputs document.write, script type=, etc, rather
>>> than including the .js file.
>>>
>>>   Bob
>>> --
>>>
>> --
>
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_**evolt/<http://evolt.org/help_support_evolt/>
>
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !
>



-- 
Erik Mattheis

http://www.flickr.com/gelk


More information about the thelist mailing list