Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
frankhilliard #1
Select list for Telephone Number
My client wants to have a drop down way of entering telephone numbers, so he
doesn't have to do a text entry. Does anyone know how to do this? All I can
think of is ten separate drop down lists from 0 to 9.
frankhilliard Guest
-
Format a number on SELECT
I know Fusion has a function called NumberFormat() for formatting numbers on the fusion side during display, but I was wondering if I can select the... -
Select a list of items into an aliased field when doinga select
OK I know this is going to sound weird, but I'm wondering if this is possible. I have a task table. (tblTask) These tasks can be assigned to... -
SELECT DISTINCT + ORDER BY gives ERROR 145: ORDER BY items must appear in the select list if SELECT DISTINCT is specified.
Following is my stored procedure. If I take the DISTINCT out then everything works fine. BUT I need the distinct because it returns duplicate... -
SELECT DISTINCT + ORDER BY gives ERROR 145: ORDER BY items mustappear in the select list if SELECT DISTINCT is specified.
Dan, You should be able to do this: SELECT Id, FaxID, ReceivedTime, Pages FROM ( SELECT DISTINCT .Id AS Id, -
select only number from varchar2
for example I have this records in varchar2 column: A123D BLA124XX 125 lkl567836785366AW 2Q and now I need select only number for spool : -
TA-Selene #2
Re: Select list for Telephone Number
If he wants a drop-down, that's pretty much the only way to do it.
Though...that is pretty bad form. It is much more cumbersome to select each
digit than to type it. And I just hope that there is no one with an extension
or an international number in the audience.
TA-Selene Guest
-
jorgepino #3
Re: Select list for Telephone Number
does you client want the pull down so no one can make a mistake on entering the
phone number?
if that is true you could use serveral type of data tools.
if the client does not want tot user the keyboard to enter the data.
you could hava a list of number on top to of the entry field
and when you click the top number it will autopopulate the phone field
jorgepino Guest
-
frankhilliard #4
Re: Select list for Telephone Number
That would work. How do you do that?
frankhilliard Guest
-
jorgepino #5
Re: Select list for Telephone Number
you could user javascript
add each value to an array and display it after each value is added into a textfield
jorgepino Guest
-
frankhilliard #6
Re: Select list for Telephone Number
Could you point me at an example? Once I see how it's done, I can modify it to fit.
frankhilliard Guest
-
jorgepino #7
Re: Select list for Telephone Number
Sure, Here it is!
<!doctype html public "-//IETF//DTD HTML//EN//2.0">
<html>
<head>
<META NAME="date" CONTENT="2005-07-07">
<META NAME="author" CONTENT="Jorge Pino">
<title>Dialer</title>
<style>
.changedField {background: #FFFF99; }
.changedField2 {background: #99FFCC; }
</style>
</head>
<body>
<SCRIPT language=javascript>
/*
The Dialer
Author : Jorge Pino
Web : Nomadicstudio.com
*/
var Dialer = "";
var newDialer = "";
var Ndigits = 10;
var digits = 0;
function digit(c)
{
newDialer = c;
if (digits < Ndigits-1)
{
++digits;
Dialer = document.Dialer.message.value + newDialer;
}
document.Dialer.message.value = Dialer;
}
function LoadOnClick()
{
document.Dialer.message.value="";
}
function ResetOnClick()
{
digits = 0;
newDialer = "";
Dialer = "";
document.Dialer.message.value = Dialer;
}
</SCRIPT>
<table width="180" border="1" bordercolor="#CCCCCC">
<FORM font size=3 NAME=Dialer METHOD="POST">
<tr><td colspan="3" align="center"><input type="text" name="message"
size="10" ></td></tr>
<tr>
<td width="33%"><INPUT TYPE=reset NAME="resetbutton" VALUE="Cancel"
onClick=ResetOnClick()></td>
<td width="33%"></td>
<td width="33%"><INPUT TYPE=submit VALUE="Send"></td></tr>
</FORM>
<tr>
<td align="center" onClick="this.className='changedField'"><a
HREF="javascript:digit(1)"><strong>1</strong></a></td>
<td align="center" onClick="this.className='changedField'"><a
HREF="javascript:digit(2)"><strong>2</strong></a></td>
<td align="center" onClick="this.className='changedField'"><a
HREF="javascript:digit(3)"><strong>3</strong></a></td>
</tr>
<tr>
<td align="center" onClick="this.className='changedField'"><a
HREF="javascript:digit(4)"><strong>4</strong></a></td>
<td align="center" onClick="this.className='changedField'"><a
HREF="javascript:digit(5)"><strong>5</strong></a></td>
<td align="center" onClick="this.className='changedField'"><a
HREF="javascript:digit(6)"><strong>6</strong></a></td>
</tr>
<tr>
<td align="center" onClick="this.className='changedField'"><a
HREF="javascript:digit(7)"><strong>7</strong></a></td>
<td align="center" onClick="this.className='changedField'"><a
HREF="javascript:digit(8)"><strong>8</strong></a></td>
<td align="center" onClick="this.className='changedField'"><a
HREF="javascript:digit(9)"><strong>9</strong></a></td>
</tr>
<tr>
<td></td>
<td align="center" onClick="this.className='changedField'"><a
HREF="javascript:digit(0)"><strong>0</strong></a></td>
<td></td>
</tr>
</table>
</body>
</html>
jorgepino Guest
-
frankhilliard #8
Re: Select list for Telephone Number
That was it! Perfect. Thank you very much for this. :D
frankhilliard Guest
-



Reply With Quote

