Announcement

Collapse
No announcement yet.

JavaScript Mehtod Library

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • JavaScript Mehtod Library

    Hi
    i know how to include PHP Libraries in my App's. Very nice :-)

    But how can i add my Javascripts Methods as a Library. I'm tired to write same code twice.

    Thank's for your help.
    Best regards
    Steve

  • #2
    Easy.

    PHP Code:
    echo <script src="yourlibrary" type="text/javascript"></script>
    /Giuseppe

    Professional Scriptcase Services
    Some Customers opinions

    Comment


    • #3
      Hi
      thank's for the answer. Is there also a trick to do the library in sc. Everytime a write a JS Funktion, it sets me autocratically the <php ?> tags to the file.
      To do by Hand (upload the file with ftp) is not so sexy, because i have different deployment location.

      Best regards
      Steve

      Comment


      • #4
        Originally posted by stephanw View Post
        Hi
        thank's for the answer. Is there also a trick to do the library in sc.
        In macros exists sc_include_lib where you can include JS libraries, but don't know where you have to place it, never used it.
        I always place my external custom code on a folder, and take care to deploy this folder with my projects.

        Everytime a write a JS Funktion, it sets me autocratically the <php ?> tags to the file.
        Don't understand this.

        To do by Hand (upload the file with ftp) is not so sexy, because i have different deployment location.

        Best regards
        Steve
        You have to deploy manually sorry.
        /Giuseppe

        Professional Scriptcase Services
        Some Customers opinions

        Comment


        • #5
          Everytime a write a JS Funktion, it sets me autocratically the <php ?> tags to the file.
          Don't understand this.
          In Tools=> Libraries i can make a new project library and edit it. I thought maybe i can write the file there, include it with your trick above and everything fine. I think the .php extension from the file is not a problem, even it's a js-library.
          But SC everytime writes the <php ?> tags around my js code. So i can not use it as a js file.

          Best regards
          Steve

          Comment


          • #6
            Because this section is for PHP libs not JS, for this reason file is wrapped with PHP tags.
            /Giuseppe

            Professional Scriptcase Services
            Some Customers opinions

            Comment

            Working...
            X