Phone Number Manipulation
I run an eCommerce site and I have a checkout form that requests the customers phone number. I have it set up as one whole field, not broken up: 3,3,4 - too hard to re-work. Therefore a customer is free to enter anything:
(987) 555-1234
9875551234
(9875551234
etc.
I want to format the phone number before it is saved to the database in the following format:
987-555-1234
Basically, I need to strip the number of everything except the numbers and then add a "-" after the 3rd and 6th number?
View Replies
ADVERTISEMENT
if someone enters phone number like this:
7209080987
i want to change it to
720-908-0987
but if someone has already entered the phone number in this way 720-908-0987
then dont make any changes
i am running into the problem to check in which way the phone number was entered 720-908-0987 any idea how i can check and make the change.
View Replies
View Related
Does anybody know if there is a function in ASP to display a phone number in this format xxx-xxx-xxxx ?
View Replies
View Related
Our application tracks contact information. One of our clients, a car
dealership, has asked about being able to enter a lastname and phone number
and getting as much of the main form filled out as possible, "Hi, thanks for
stopping by Demaux Motors. Before we get started, can I get your phone
number, please? Oh, HI Joe, you still live on Gingerbread lane..?" etc etc
etc. Filling out the form is easy - sql query, javascript, blah blah blah -
getting the data is another. My question is three-fold:
1: I know that if you go to Google and type a phone number, you'll get a
query result back with address, city, state, etc. The documentation for the
Google APIs are written for .NET...anyone have any experience with those
APIs in classic ASP?
2: Is there some other service that provides this same functionality?
View Replies
View Related
I've been messing around with this for a while now and can't figure it out. I'm trying to use this code to pull a person's phone number out of a database:
<%
call GetAddrInfo ("BenPhone_v",datavalue)
if datavalue = TRUE then
%>
<%call GetAddrInfo ("BenPhone",datavalue)%>
Phone Number: <%=datavalue%>
<%end if%>
What it returns is an unformatted phone number (ie: 5555555555) Nothing I've tried will format the number. I think the problem is the code that's being used to retrieve data from the database, but I'm not sure: Code:
View Replies
View Related
I have created an MS-Access DB that holds data items including phone number and currency. Utilzing the input mask function in MS-Access, and using Access to input data, keeps the data looking clean, i.e. $5,678.32 and (555) 555-1234. When I read this information from an ASP page into my repeatable region table (I'm using Dreamweaver btw), the data is displayed as 5678.32 and 5555551234. How can I format the data on my displayed ASP page to be formatted as currency and a proper phone number mask?
View Replies
View Related
i am trying to format a telephone number (returned from the database as digits, no hyphens) to include hyphens. the database field is set as char with a length of 10. when i run the following code, i get a type mismatch error.
Private Sub formatDN(strTele)
'Changes a Telephone to a recognizable format
if Len(strTele) = 10 then
strFormatted = "(" & mid(strTele,1,3) & ") " & mid(strTele,4,3) & "-" & mid(strTele,7,4)
response.write strFormatted
Else
response.write strTele
End if
End Sub
'section of code that calls the function
HTML = HTML & "" & adoRSWEBtest(0) & " (" & adoRSWEBtest(1) & ") <br>" & formatDN(adoRSWEBtest(2)) & "<br><br>"
View Replies
View Related
I have a database column that contains phone number information, but it has no delimeters (5555555555 instead of 555-555-5555). How can I add them?
View Replies
View Related
I have a text field in a web page I am working on that seems to be calculating phone numbers before inserting them into an Access database. i.e., 867-5309 will result as -4442 in the Access text field. My guess is that the webserver or client is processing it before inserting it. Is there any way to stop this other than using a validation script?
View Replies
View Related
i have a phone field in one of my tables. the data is pretty ate up. there's some numbers with .,- and extra spaces among other things. how can i do a mass update i would like to have all the phone numbers formated like this 555-555-5555 .
View Replies
View Related
I will attach a zipped file with data in it. I want to pull distinct phone numbers from column B and column D (as some of the numbers will be the same). then rank by asc order based on TotalCashPrice. If they are the same, I want to compare the TotalCashPrice to TotalCashPrice2. Is that possible?
View Replies
View Related
I have seen other poster's solutions to this question, but cannot make heads or tails of it so I thought maybe someone could answer my question specifically. On an ASP Details page, I have dynamic text with a company's address, phone and fax numbers. I want the phone and fax numbers to be formatted like (###) ###-#### on the screen. They are entered in MS Access in 10-digits only with an input mask to format them in Access.
I am using DWMX 2004 and am not a programmer or coder by any means. I create my recordsets in DWMX in simple mode, so if you can help me, please be specific. My field names are MbrMainPhone and MbrFax if that helps.
View Replies
View Related
I'm looking for a way to send a text message to a nextel phone using asp. I tried some of my scripts,in the recipient field I included my email ("myemail.domain.com") and ("1234567@messaging.nextel.com").
the messsge was successfullysent to my email but failed in the nextel email. Also when I send the message through groupwise (our mailing system) the message to nextel goes through with no problem.
View Replies
View Related
I got this so far.But I need the user to be able to enter a space, a () and a dash into the field. ASP Code:
if studentphone="" or not IsNumeric(studentphone) then
lvValid=0
lvstudentphone="<font color='#CC0000'>"&lvstudentphone&"</font>"
end if
View Replies
View Related
If I want my phone number like this...
(XXX)XXX-XXXX
([0-9]{3})[0-9]{3}-[0-9]{4} ....
View Replies
View Related
I need to open client phone dialer from my asp page that contains phone number and fill phone number automatically when dialing. What should I need to start about this?
View Replies
View Related
I have a situation where I need to send a text message to a cell phone. Any ideas?
View Replies
View Related
Anyone attempted this one yet using ASP? I've found a few PHP scripts, but nothing in ASP. Basically looking for this:
1. User takes a picture on their cell phone
2. User emails picture to statis email address on my site
3. Image is uploaded to my server
4. Image is displayed for others to see
View Replies
View Related
I ran into a problem where I need some help
I am having a form textfield receiving a number like
110000101.
In my sql database i want to have this number being manipulated that it will only insert 100001. How can I do this?
View Replies
View Related
What im trying to achieve is this:
Getting the HTML code of a website, and then extracting specific information. Im trying to get flight information from a website, but there may be more than one flight in a search criteria...so i want it to loop untill it cant get any more.
I've managed to get the html from the other website, and i've also managed to get the first flight on the page.
I believe my problem is with this part of code (might want to review full code below):
Code:
View Replies
View Related
I've been asked by a friend to try and code something that works like this and I would be able to except for the fact that it's on a IIS server without PHP.
That said, I wouldn't mind learning ASP now that I have a project to learn on, but I need to do it in decent time. Could anybody point me to a package that does something like this that I could pick apart and learn from, or point me to some worth while ASP text manipulation links that might get me a good start on learning what I need to get it done?
And as a last choice if I can't get it done quick enough, does anybody have any links to premade packages that I could purchase that would do the same thing?
View Replies
View Related
I have a string (ie.1.0.1.39) I want to replace the number after last "." with another number. What would be the best way to do it?
the lenght of the number after last "." may change and the lenght of the number to be replace varies as well
View Replies
View Related
How do I seperate the "chk_" and "33" in the following string:
chk_33
View Replies
View Related
My attendance system records time IN and OUT in the format 5:00 AM and 5:00PM. I want to generate a report that "how many IN in between 7:00 AM and 8:00 AM"
if have tested as rs("eventtime")>"7:00" and rs("eventtime")<"8:00"
its working but its the same result for AM or PM.How can i differentiate and test AM and PM.
View Replies
View Related
I am researching option for doing the following in ASP:
1. Thumbnailing an image as it is uploaded and/or selected by user, basing the thumbnail size on the current image dimensions [hence need to detect image dimensions]
2. Rotate an uploaded image [portrait to landscape and vice-versa]
Googling I find a wide range of mainly commercial COM components for doing this and other manipulations.
I am wondering what is the most "standard" way of doing this in normal ASP (3.0). Do servers tend to have preinstalled components for this? Is there a set of components most commonly used?
View Replies
View Related
How do you redirect a script that create a browser without a url address and the size of the browser is intact?
I've seen this before(forgot the site!) but dont know exactly how this is done.
View Replies
View Related
I have a text file that I have to retreve certain parts of it, and store them into variables. *its a lot* You can download the txt file at the following location. What my main goal is to move down past the 2nd set of "****" and start to collect values. (the number of lines before the 2nd set of "****" could change) So i need to store each of the columes into an array. or something liekt hat.
I just need to get the seperated characters by " " into seperate variables for ALL the lines between the 2nd "****" and the 3rd .
View Replies
View Related
I have a dynamic string where the length varies.I need to write a function that will return part of a string, placed between first 2 symbols and last 3 symbols. For example the string DEVELOPMENT will return the following: ...
View Replies
View Related
I have a very long string, that I need to cut up into more usable sections and display or write to text file. It should: Read the string in, move along the string x number of characters then find the nearest end of the sentance, eg. a . or ? write a new line and do this again. Basically I want to end up with a number of lines of full sentances of a similar length.
View Replies
View Related
I have short term project, and I haven't used ASP in a long time. I need to know about image manipulation, I need to take an image that is uploaded, and make a thumbnail of it, (as well as one about 50% scale).
View Replies
View Related
This looks elementary but I dont know how . How do I remove the trailing text after a symbol @. my_username@email.com and wanted my_username to remain as a result?
View Replies
View Related
I have a first name last initial, all displayed as one. I want to break it appart & show capital letters on the initials. IE: "johnd" > "John D"
Did a search around the forums, but only found info on the "replace" function. Don't think I could do this with that function alone. This should be a simple problem, but I'm pretty new to asp (not to programming though).
View Replies
View Related
I have a fairly simple access database that I want to be able to view/update/delete etc from a html page using asp. The database would be on a server and would use a dsn connection to it.
View Replies
View Related