Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jul 2002
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    external .js files

    I'm attempting to use an external .js files.

    And I've run into the following situation.
    It works than I come back to it and it doesn't.
    I remove everything but an alert box and it works.
    I than add in the validation code that is the purpose of the js file.
    -- it works.

    I than moved it to a different web host and have run into the same sitution where it's not finding the external .js file.
    All that is in the file now is an alert box.

    This is the code in the html file:

    <script scr="javas/validform.js" language="Javascript" Type="Text/Javascript">

    </script>

    <form onsubmit="return validate(this)" name="Appform">


    The validform.js file is located in the folder javas and this is all the code that is currently in it.


    function validate(theForm)
    {
    alert("you are into the javascript");
    }


    Is there a known issue with external js files ? I haven't had any luck finding anything when searching. And I'm learning this on the fly - so I may just be missing something simple.

    Thanks.

    SR

  • #2
    New Coder
    Join Date
    Jul 2002
    Posts
    56
    Thanks
    0
    Thanked 0 Times in 0 Posts


    Is the javas folder in the same folder as the HTML document referencing it ?

  • #3
    New to the CF scene
    Join Date
    Jul 2002
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    yes.

    the folder structure is:

    www<folder>
    html <file> within the www folder
    javas <folder> within the www folder
    validform.js <js file> within the javas folder


    ------------------------
    the src="javas/validform.js" - is in the html code.

    SR


  •  

    Posting Permissions

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