Want to get rid of Google Ads, click here.
+ Reply to Thread
Results 1 to 11 of 11

Thread: Call external JS function from DO

  1. #1
    Senior Member pfilaretov's Avatar
    Join Date
    Jan 2009
    Location
    St.-Petersburg, Russia
    Posts
    112

    Question Call external JS function from DO

    Hello!

    I need to call JS function that resides in
    .../Tomcat/webapps/sm/ext/ic_agent.js
    on the button click. How can I get to it (function) from JS tab in Display Option?

    Any help will be much appreciated!
    Thanks in advance!

  2. #2
    Administrator tommy's Avatar
    Join Date
    Nov 2001
    Location
    Copenhagen
    Posts
    4,272

    Default

    If you want SC to execute the script then it can only be serverside scripting. No clientside scripting is supported.

    If this is the case you can read the file as text file and execute the javascript with eval().
    Best regards Tommy
    Blog - - ITIL certified - Accredited Integration Specialist – HP OpenView Service Management

    Want to keep this site alive? Consider making a donation. Click here.

  3. #3
    Senior Member pfilaretov's Avatar
    Join Date
    Jan 2009
    Location
    St.-Petersburg, Russia
    Posts
    112

    Default

    Quote Originally Posted by tommy View Post
    If this is the case you can read the file as text file and execute the javascript with eval().
    Thanks, it works! But now I have another problem. Since SM have only server-side scripting, JS objects like 'window' isn't available. Is it possible to get these objects from Display Option JS tab?
    Last edited by pfilaretov; 2009-02-03 at 11:05.

  4. #4
    Administrator tommy's Avatar
    Join Date
    Nov 2001
    Location
    Copenhagen
    Posts
    4,272

    Default

    Thats what I said. SC do not support clientside javascript. Which means you cannot manipulate forms with javascript.
    Best regards Tommy
    Blog - - ITIL certified - Accredited Integration Specialist – HP OpenView Service Management

    Want to keep this site alive? Consider making a donation. Click here.

  5. #5
    Senior Member pfilaretov's Avatar
    Join Date
    Jan 2009
    Location
    St.-Petersburg, Russia
    Posts
    112

    Default

    It's not good on the part of SM.
    Thanks tommy!

  6. #6
    Administrator tommy's Avatar
    Join Date
    Nov 2001
    Location
    Copenhagen
    Posts
    4,272

    Default

    I know. We are many that are hoping it will come soon.
    Best regards Tommy
    Blog - - ITIL certified - Accredited Integration Specialist – HP OpenView Service Management

    Want to keep this site alive? Consider making a donation. Click here.

  7. #7
    Senior Member mateuszk's Avatar
    Join Date
    Nov 2006
    Posts
    302

    Default

    hmm ... you guys really sure of that?
    Did you guys have a good look on xsl files that create the web forms?

    For what I know, hacking/customizing the web client is much easier
    as it's much more "open" compared to Win client.
    Now way it's "impossible", it might only be bit more complicated.


    On the other hand, the first question that comes to mind - what sort of functionality you're trying to develop that can't use SM server side processing?

  8. #8
    Senior Member pfilaretov's Avatar
    Join Date
    Jan 2009
    Location
    St.-Petersburg, Russia
    Posts
    112

    Default

    I try to develop functionality that makes outgoing calls from SM. To do this I need to call JS function from external file. This function sets
    window.status= 'making call';
    and CTI (Avaya) makes phone call if this status is set as above.

    Quote Originally Posted by mateuszk View Post
    For what I know, hacking/customizing the web client is much easier
    as it's much more "open" compared to Win client.
    Now way it's "impossible", it might only be bit more complicated.
    I'll try to implement your idea
    But I was looking for a "legal" way to solve this problem.

  9. #9
    Administrator tommy's Avatar
    Join Date
    Nov 2001
    Location
    Copenhagen
    Posts
    4,272

    Default

    Quote Originally Posted by mateuszk View Post
    hmm ... you guys really sure of that?
    Did you guys have a good look on xsl files that create the web forms?

    For what I know, hacking/customizing the web client is much easier
    as it's much more "open" compared to Win client.
    Now way it's "impossible", it might only be bit more complicated.
    As I said it is not SUPPORTED. You may be able to hack your way to functionality but you will NOT get any support from HP regarding that functionality or if you break other functionality in the process.
    Best regards Tommy
    Blog - - ITIL certified - Accredited Integration Specialist – HP OpenView Service Management

    Want to keep this site alive? Consider making a donation. Click here.

  10. #10
    Senior Member mateuszk's Avatar
    Join Date
    Nov 2006
    Posts
    302

    Default

    Quote Originally Posted by tommy View Post
    As I said it is not SUPPORTED.
    Yes Tommy, I got that.
    Thanks for reminding.


    Wait ... on the other hand ...
    why didn't you, pfilaretov, contact SUPPORT if you needed a supported solution?

  11. #11
    Senior Member pfilaretov's Avatar
    Join Date
    Jan 2009
    Location
    St.-Petersburg, Russia
    Posts
    112

    Default

    I'll try to contact support but I don't think this helps

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Bookmarks

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