Forum Moderators: open
i am now looking in to setting up a 4 page dynamic website using the same content special for mobile users, stripping all images and bandwith consuming design elements.
But i ran into an massive job converting the telephone numbers into dialable numbers.
is there any way to impement a function or a re-write to go form:
"tel: 0055 555 555 555"
to
"<a href="wtai://wp/mc;0055555555555">tel: 0055 555 555 555</a>
maybe a vb fuction to "find and replace" a string to the specified format?
i would appreciate any referral to contents that are helpfull.
For example:
<%
Dim phonenum
phonenum="tel: 0055 555 555 555"newphonenum=Replace(phonenum," ","",6)
Response.Write "<a href='wtai://wp/mc;"&newphonenum&"'>phonenum</a>"
%>
You're basically taking the string "tel: 0055 555 555 555" and replacing each space with a no-space. The number 6 is used to strip out the "tel: ".
I tested it and it works.
i used javacript to do something like this:
<%
var str = (Recordset.Fields.Item("AnyTypeOfField").Value);
var telnr = 5 + (str.indexOf("Tel:"));
var telwithspace = (str.substring(telnr,telnr+13));
var telnospace = (telwsp.replace(/ /gi, ""));
Response.write("<a href='wtai://wp/mc;+34" + telnsp + "'target='blank'>Tel:" + telwsp + "</a>");
%>
it works to the same principe - searches for "Tel:" cuts the number behind it strips the spaces and writes the link i want.