in my mobile site...during a postback, server code assigns a variable to a telephone number. upon page load, i call a js function that finds a hyperlink on my form, assigns the href attribute to dial the telephone number and calls .click() on the hyperlink. this is not working in safari. here is the js code:
function ExecuteTelephony(){
var sURL = "<%=ExecuteTelephony%>"
if (sURL != "" && sURL != "undefined"){
var o = document.getElementById('ctl00_lnkOpenHyperlink')
if (o) {
o.href = sURL;
o.setAttribute("href",sURL);
o.click();
}
return true;
}
return false;
}
"<%=ExecuteTelephony%>" calls a server side method that returns a string that looks like "tel:8003459999". in my non-mobile site, i use the same methodology to initiate a skype call. it is working in IE, this is the only supported browser in our non-mobile site. from what i've seen in my safari testing, the hyperlink's href attribute is being set correctly (i can click the link after the page loads), so I think the problem lies in the o.click() line.
if this is the problem, is there a way to solve it in safari? in other mobile browsers? my goal is to support the ability to postback, set a server variable, and upon page reload initiate a call to the number set in that server variable.
i greatly appreciate any input on this...i'm stumped!
function ExecuteTelephony(){
var sURL = "<%=ExecuteTelephony%>"
if (sURL != "" && sURL != "undefined"){
var o = document.getElementById('ctl00_lnkOpenHyperlink')
if (o) {
o.href = sURL;
o.setAttribute("href",sURL);
o.click();
}
return true;
}
return false;
}
"<%=ExecuteTelephony%>" calls a server side method that returns a string that looks like "tel:8003459999". in my non-mobile site, i use the same methodology to initiate a skype call. it is working in IE, this is the only supported browser in our non-mobile site. from what i've seen in my safari testing, the hyperlink's href attribute is being set correctly (i can click the link after the page loads), so I think the problem lies in the o.click() line.
if this is the problem, is there a way to solve it in safari? in other mobile browsers? my goal is to support the ability to postback, set a server variable, and upon page reload initiate a call to the number set in that server variable.
i greatly appreciate any input on this...i'm stumped!