SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot
    Join Date
    May 2002
    Posts
    108
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    mutiple javascript src?

    i'm wondering if there's the ability to have multiple src .js files? or how do you handle something like that?

    let's say you have:
    PHP Code:
    <script language="JavaScript" src="setPointer.js">
    </script> 
    but you need to add something else to the page like:
    PHP Code:
    function popUp(URL) { 
    i tried putting in between the <script> and even tried including it into the .js file but neither way worked. so i'm wondering how to handle seperate things with javascript. is it possible?

    well i found out how to do it....you actually can have multiple src's...
    it would end up looking like this
    PHP Code:
    <script language="JavaScript" src="setPointer.js">
    </script>
    <script language="JavaScript" src="popUp.js">
    </script> 
    of course i had to create the popUp.js file which contained something simple like:
    PHP Code:
    function popUp(URL){

    pop window.open(URL,"","width=400,height=500,resizable=1,scrollbars=1,menubar=1")

    pop.focus() 


    well ya learn something new everyday...
    Last edited by vr6stress; Oct 13, 2002 at 18:25.
    i want to be a nerd....

  2. #2
    Perl/Mason Guru Flawless_koder's Avatar
    Join Date
    Feb 2002
    Location
    Gatwick, UK
    Posts
    1,206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Or you could just stick them both in the same file

    Flawless
    ---=| If you're going to buy a pet - get a Shetland Giraffe |=---

  3. #3
    SitePoint Zealot
    Join Date
    May 2002
    Posts
    108
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    naw i tried that....and i couldn't get it to work...

    i think keeping them seperate saves me trouble down the road...
    i want to be a nerd....

  4. #4
    Perl/Mason Guru Flawless_koder's Avatar
    Join Date
    Feb 2002
    Location
    Gatwick, UK
    Posts
    1,206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Agreed - It may well do ...

    ODD though @ not getting them to work!

    Good luck with it all

    Flawless
    ---=| If you're going to buy a pet - get a Shetland Giraffe |=---


Bookmarks

Posting Permissions

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