08/08/2011, 13:40
|
| | | Fecha de Ingreso: julio-2009
Mensajes: 99
Antigüedad: 15 años, 3 meses Puntos: 8 | |
Respuesta: El objeto no acepta esta propiedad o metodo
Código:
<script language="Javascript">
function getPhone() {
return document.getElementById('phone');
}
function debug(message) {
debugdiv = document.getElementById('debug');
debugdiv.innerHTML = debugdiv.innerHTML + message + "<br/>";
}
function doRegister() {
debug("doRegister called");
var host = document.getElementById('iaxhost').value;
var cnumber = document.getElementById('cnumber').value;
var cname = document.getElementById('cname').value;
var user = document.getElementById('user').value;
var pass = document.getElementById('pass').value;
debug("Host: "+host);
debug("Calling Number: "+cnumber);
debug("Calling Name: "+cname);
debug("User: "+user);
debug("Secret: *********");
phone = getPhone();
phone.setHost(host);
phone.setCallingNumber(cnumber);
phone.setCallingName(cname);
phone.setUser(user);
phone.setPass(pass);
phone.setWantIncoming(true);
phone.register();
}
function doDial() {
debug("doDial invoked");
phone = getPhone();
var number = document.getElementById('number').value;
debug("dial "+number+" called");
phone.dial(number);
}
function doHangup() {
debug("doHangup invoked");
phone = getPhone();
phone.hangup();
}
function setup() {
debug("Applet setup");
getAudioInDevices();
getAudioOutDevices();
phone = getPhone();
phone.setAudioIn(phone.getAudioInList(0));
phone.setAudioOut(phone.getAudioOutList(0));
}
// Callback functions here
function loaded() {
debug("Applet loaded");
}
function registered(status) {
debug("Registered callback status: "+status);
}
function hostreachable(status, roundtrip) {
debug("Host reachable message received, status: "+status+", roundtrip: "+roundtrip);
}
function newCall(inbound, far, near, answered, callingname) {
if (inbound == "true") {
// new incoming call
debug("Incoming call...");
debug("Far: "+far);
debug("Near: "+near);
debug("Answered: "+answered);
debug("callingname: "+callingname);
} else {
// new outbound call
debug("Outbound call...");
debug("Far: "+far);
debug("Near: "+near);
debug("Answered: "+answered);
debug("callingname: "+callingname);
}
}
function hungUp(causecode) {
debug("Hungup, CauseCode: "+causecode);
}
function ringing(inbound, far, near, answered, callingname) {
if (inbound == "true") {
// new incoming call
debug("Incoming ringing...");
debug("Far: "+far);
debug("Near: "+near);
debug("Answered: "+answered);
debug("callingname: "+callingname);
} else {
// new outbound call
debug("Outbound ringing...");
debug("Far: "+far);
debug("Near: "+near);
debug("Answered: "+answered);
debug("callingname: "+callingname);
}
}
function answered(inbound, far, near, answered, callingname) {
if (inbound == "true") {
// new incoming call
debug("Incoming answered...");
debug("Far: "+far);
debug("Near: "+near);
debug("Answered: "+answered);
debug("callingname: "+callingname);
} else {
// new outbound call
debug("Outbound answered...");
debug("Far: "+far);
debug("Near: "+near);
debug("Answered: "+answered);
debug("callingname: "+callingname);
}
}
function getAudioInDevices() {
phone = getPhone();
devices = phone.getAudioInListLen();
for(var i=0;i<devices;i++) {
debug("Audio In Device: "+phone.getAudioInList(i));
}
debug("Current Audio In Device: "+phone.getAudioIn());
}
function getAudioOutDevices() {
phone = getPhone();
devices = phone.getAudioOutListLen();
for(var i=0;i<devices;i++) {
debug("Audio Out Device: "+phone.getAudioOutList(i));
}
debug("Current Audio Out Device: "+phone.getAudioOut());
}
</script>
este es el codigo completo, si, llama a una libreria que es un applet , lo que realiza en la funcion que da error es el detalle de los dispositvos de audio del pc 'getAudioInDevices' pero el metodo si existe porque funciona a la perfeccion en cualquier explorador que no sea iexplorer 6 |