Results 1 to 5 of 5

Thread: <script> tag help

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    didn't decide yet
    Posts
    566

    <script> tag help

    Hi to all say i have the following

    PHP Code:
    <script  language="JavaScript" src="js/page.js" type="text/javascript"></script
    how could i load the src dynamically through another function or whatever.I want to do that cuase is not nessecary to load page.js all the time and i do not want to cause is a 300k page so i want to set a var to load it any time i want any help appreciated

    thnks

  2. #2
    Hyperactive Member progressive's Avatar
    Join Date
    Sep 2001
    Location
    Manchester, UK
    Posts
    404
    using the below code you can print the include line

    Code:
    document.write("<script language=\"javascript\" src=\"test.js\"><\/script>");

  3. #3
    Frenzied Member
    Join Date
    Feb 2001
    Posts
    1,140
    That is, if she is using VBScript ASPs.
    Travis, Kung Foo Journeyman
    As always, RTFM.

    WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
    Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
    YBMS, but Mozilla doesn't.

  4. #4
    Hyperactive Member progressive's Avatar
    Join Date
    Sep 2001
    Location
    Manchester, UK
    Posts
    404
    No!

    this is using javascript

    Code:
    <script language="javascript">document.write("<script language=\"javascript\" src=\"test.js\"><\/script>");</script>
    try it CyberTHug, it works. I was supprised that it worked myself but it did.

  5. #5
    Frenzied Member
    Join Date
    Feb 2001
    Posts
    1,140
    Sorry, you're right. I wasn't even paying attention. You said "document.write", not "response.write".
    Travis, Kung Foo Journeyman
    As always, RTFM.

    WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
    Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
    YBMS, but Mozilla doesn't.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width