I just encountered this myself, here is my solution...
The onchange() trigger in the select box calls a function that looks
something like this:
function checkField( theBox ){
boxVal = theBox.options[theBox.selectedIndex].value;
if( boxVal == 1 ){
field1.disabled = false;
field2.disabled = true;
field2.value = "Not Required";
field3.disabled = true;
field3.value = "Not Required";
}
......
}
that only works in IE, so you must also add an onFocus() trigger to each
input field that calls a function that looks something like this to
accomodate Netscape:
function fieldFocus( theBox, theField ){
boxVal = theBox.options[theBox.selectedIndex].value;
[if this is not a required...]
theField.blur();
}
Beware - I've heard that IE6 changed onFocus() and onBlur() to onFocusIn()
and onFocusOut(), but I haven't tried it yet...
+-----------------------------------------------+
Bryan Love
Macromedia Certified Professional
Internet Application Developer
Database Analyst
Telecommunication Systems
[EMAIL PROTECTED]
+-----------------------------------------------+
"...'If there must be trouble, let it be in my day, that my child may have
peace'..."
- Thomas Paine, The American Crisis
-----Original Message-----
From: VAN VLIET, SCOTT E (SBCSI) [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 28, 2002 12:18 PM
To: CF-Talk
Subject: RE: OT: Oracle version of TOP
Thanks for all of the input. I tried using RANK(), however I have been
informed that we are using a third-party OBDC connector (for Peregrine's
Asset Center). Errrr...
--
SCOTT VAN VLIET
SENIOR ANALYST
SBC SERVICES, INC
Tel: 858.886.3878
Fax: 858.653.6763
Email: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
-----Original Message-----
From: Steven Monaghan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 28, 2002 11:41 AM
To: CF-Talk
Subject: RE: OT: Oracle version of TOP
What version are you on?
In 8.1 (8i) and above, you can do the following:
SELECT Empno, Ename, Job, Mgr, Hiredate, Sal
FROM
(SELECT Empno, Ename, Job, Mgr, Hiredate, Sal
FROM Emp
ORDER BY NVL(Sal, 0) DESC)
WHERE ROWNUM < 6;
For 8.0 and below, you cannot do an order by in a nested select, but you can
cheat by doing the following:
SELECT Empno, Ename, Job, Mgr, Hiredate, Sal
FROM
(SELECT Empno, Ename, Job, Mgr, Hiredate, Sal
FROM Emp
union
SELECT 1,2,3,4,5,6
from dual where 1=2)
WHERE ROWNUM < 6;
The union forces a sort (in ascending order only!) and tricks oracle into
sorting.
Here's a link that should help...
http://www.jlcomp.demon.co.uk/faq/top_sql.html
Steve
-------------------------------------
Steven Monaghan
Oracle DBA / Cold Fusion Developer
MSC Industrial Direct Co., Inc.
http://www.mscdirect.com
-------------------------------------
-----Original Message-----
From: Zac Spitzer [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 28, 2002 2:31 PM
To: CF-Talk
Subject: Re: OT: Oracle version of TOP
VAN VLIET, SCOTT E (SBCSI) wrote:
>Sorry for the OT, but do any of you know the Oracle function for selecting
>the top n records. (ie. SELECT TOP 10 * FROM TABLE - in SQL).
>
>Thanks!
>
>Scott
>
rowcount is similar but my oracle skills have bit rotted :-( i think :-)
z
______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists