Announcement

Collapse
No announcement yet.

Javascript Library in SC8

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

  • Javascript Library in SC8

    Hello every body,
    i have a javascript method which works fine in my application. This method is useful in several other applications. I want to create a library with this method to use it in all these other applications. but when i tried to create and download this javascript file, i had an error by scriptcase.
    someone can help me ????

  • #2
    Hey man:

    I'm affraid that SC stores only php libraries, buuut? =P why don't you try this?... create a php library lets say MyJavaFunction like this.


    PHP Code:
    <?php
    function MyJavaFunction();
    {
        echo 
    '
                // your java code here

        '
    ;
    }
    ?>
    that way you can import it to any SC application and call it in the onApplicationInit event. ik ik... dirty way to do things but... it may make your life easier.

    Regards

    Comment


    • #3
      Javascript libraries

      This also works:

      PHP Code:
      <?php 
      ?>
      <script>

      function jsfunction1() {

      }

      function jsfunction2() {

      }

      function jsfunction3() {

      }

      </script>
      <?php
      ?>

      Then activate library in Programming->Libraries and call it with sc_include macro in OnAplicationInit event. I had problems when creating and calling more than one library at the same time. So, I use just one library for my javascript functions.

      Comment

      Working...
      X