Showing results for 
Search instead for 
Do you mean 
Community Home Request Access Read Blogs Share Your Ideas Search Community View My Settings
Reply
Copper Super Contributor
Posts: 36
Registered: ‎04-16-2009

CTI integration with SLX Web 8

The Web Client needs to open a new explorer tab and do something like this:

<a href="callto://+49 3727 9999/">+49 3727 9999</a>

The phone number should be taken from the MainPhone.

 

Anyone ever tried this?

 

Thanks,

 

Hartog

Bronze Super Contributor
Posts: 129
Registered: ‎06-09-2009

Re: CTI integration with SLX Web 8

Several ways to do it:

 

  The easiest is probalby to just do it via Javascript. The sample function below would do it, just pass it a valid phone number

 

function openDialWindow(phone)
{
  w=window.open('','wnd');
  w.document.body.innerHTML = "<a href='callto://" + phone + "/'>" + phone + "</a>";
}

Raul A. Chavez
http://raul.chavez.com
http://www.crmbi.com
Copper Super Contributor
Posts: 36
Registered: ‎04-16-2009

Re: CTI integration with SLX Web 8

Thanks,

 

I've tried this before and I knew the best solution was using javascript. The only part I am missing is how to get the MainPhone text into my Javascript. When I use an alert(phone); nothing will be displayed.

 

Thanks again,

 

Hartog 

 

 

Bronze Super Contributor
Posts: 129
Registered: ‎06-09-2009

Re: CTI integration with SLX Web 8

phone is a variable I have used. You have to populate it.

 

For instance, if you have the Phone in a Text box with an ID of "txtPhone", you could do something like:

 

var phone = document.getElementById('txtPhone').value;

alert(phone);  //Should be populated

 

Or, using JQuery:

 

var phone = $('#txtPhone').text();

alert(phone);

 

 

Or, you could do it server side by building Javascript into a String and then registering it:

 

something like:

 

PAGE_ONLOAD EVENT (Server side)

.....

  IAccount acct = BindingSource.Current as IAccount;

  string jstr = "var phone = '" + acct.MainPhone + "';";

 

RegisterClientScript jstr    //  This isn't the syntax, just an example of how/what to do server side to set the phone into a variable.

 

.....

Raul A. Chavez
http://raul.chavez.com
http://www.crmbi.com
Copper Super Contributor
Posts: 36
Registered: ‎04-16-2009

Re: CTI integration with SLX Web 8

Thanks Raul,

 

I will try this tomorrow. This was exactly the missing part I was looking for Smiley Happy

 

Much appreciated!

 

Hartog Elands

 

 

Copper Super Contributor
Posts: 36
Registered: ‎04-16-2009

Re: CTI integration with SLX Web 8

It's not working. No idea why.

I've got a button on the AccountDetails form and the javascript looks like this:

 

I've tried this:

var phone1 = document.getElementById('MainPhone').value;

alert(phone1);

nothing happens

 

And this:

var phone1 = $('#MainPhone').text();

alert(phone1);

Result: empty

 

Where do I go wrong?

 

Hartog

 

 

 

 

 

 

Copper Super Contributor
Posts: 36
Registered: ‎04-16-2009

Re: CTI integration with SLX Web 8

Okay, I've found the solution. After installing Firebug I was able to trace the correct name for MainPhone. One of the above 2 solutions returned the correct phone number.

Thanks for your help Smiley Happy

Hartog