dcsimg
www.webdeveloper.com
Results 1 to 2 of 2

Thread: Don't know anything in JavaScript and could use some help

  1. #1
    Join Date
    Mar 2014
    Posts
    1

    Don't know anything in JavaScript and could use some help

    Hey All,

    I know some basic automation batch scripts, shell scripts
    but I have no experience in web development.

    At my work we use salesforce to handle tickets
    and we have internal Knowledgebase inside
    with solutions, documentation and such.

    My manger at work has asked me the following:

    We need BALink to change the js function below.

    http://kb.aeroscout.com/display/2/lo...82673954963684

    pay attention that it was without password and we do not want them to get the password from javascript. now link should be:

    http://161.36.80.16/?cid=2&c=12&cpc=...om&PW=password
    ---------------------------------------------------------------------------------------------------
    here's more information:
    Below are the functions to be embedded in the KB button. There is a different logic for each website.
    As we agreed, the partner portal will be tested (and added) in a later phase.

    Function to put on AeroScount.com/Support:

    function gotoTalisma2() {
    var username = document.getElementById('un').value
    var url = 'https://kb.aeroscout.com/display/Integration/SalesForcev2/sfdcmain.aspx?SFSID=1&SFURL=http://www.aeroscout.com/support&SFCID=&SFSearch=&SFUN='
    + username
    + '&SFFN=&SFLN=&SFPN=';
    if(username.indexOf('aeroscout.com') != -1 || username.indexOf('sbdinc.com') != -1){
    url += '&cid=36&c=12&cpc=fW5Id08wSb14p83b4eq5DdxX0IeMQglCnFRq3KY2b3M';
    }
    else{
    url+='&cid=35&c=12&cpc=71jkASYig05g1o1e3700QjPa8QFx7f75C43';
    }
    if(navigator.userAgent.toLocaleLowerCase().indexOf('chrome') != -1 ){


    var a = document.createElement("a");
    a.href = url;
    var evt = document.createEvent("MouseEvents");
    //the tenth parameter of initMouseEvent sets ctrl key
    evt.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0,
    true, false, false, false, 0, null);
    a.dispatchEvent(evt);
    }
    else {
    window.open(url);
    window.focus();
    }
    }

    Function to put on Stanleyhealthcare.com/Support:





    can someone please advise from where do I start?
    I remind you that I'm not familiar with java script or web development at all.

    Any comment would be highly appriciated!
    Thanks

  2. #2
    Join Date
    May 2006
    Location
    Somewhere behind your screen
    Posts
    1,671
    i wish i saw your manager at work doing some abdominal surgery - just for fun, why not?

Thread Information

Users Browsing this Thread

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

Posting Permissions

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



Recent Articles