Ask a Question related to Dreamweaver AppDev, Design and Development.
-
oppels #1
Help with an IF THEN statement
Hi,
I want to write an if then statement that will take the first item I choose
from a dynamic text field in my form and input it into the database as well as
a second value I have associated with the first.
i.e. I choose from a dropdown menu " 99214" then click on add button and both
99214 and the value of 1.1 are placed in the database. 99214 in levelofservice
and 1.1 in rvu.
There are actually about 8 or 9 choices in the dropdown and each has a
different associated value.
I am not too familiar with conditional statements and the 3 books i have arent
helping so, if anybody can help, i would appreciate it.
Thanks,
Steve
oppels Guest
-
If Statement???
guys i was wondering if anybody here could help me. I have a page done up with all dynamic text and attributes on it that come from a management... -
Use of FOR statement
I am reading through a book on Objects and References and I don't understand this statement: $sum += $_ for split //; I thought a FOR... -
AW: if-else-statement
--On Wednesday, September 03, 2003 11:56 PM +0200 "B. Fongo" <mygrps@fongo.de> wrote: Look at the docs for CGI.pm under pragmas, the -nosticky... -
if statement
I'm trying to write an if statement i have two field, Status and Attendance. "status" value can be active or inactive "Attendance" value is active... -
IIF statement
Assuming the data is being entered via a form, then use the AfterUpdate event of the control that is bound to the signature field. The code you need... -
...helmut #2
Re: Help with an IF THEN statement
it would help to know what programming language you are using(PHP ASP CF)
also what code have you produced already. like showing your if statements
and where you think they are breaking.
--
....helmut
helmutgranda.com
"oppels" <steve@cplains.com> wrote in message
news:d6879e$uk$1@forums.macromedia.com...> Hi,
>
> I want to write an if then statement that will take the first item I
> choose
> from a dynamic text field in my form and input it into the database as
> well as
> a second value I have associated with the first.
>
> i.e. I choose from a dropdown menu " 99214" then click on add button and
> both
> 99214 and the value of 1.1 are placed in the database. 99214 in
> levelofservice
> and 1.1 in rvu.
>
> There are actually about 8 or 9 choices in the dropdown and each has a
> different associated value.
>
> I am not too familiar with conditional statements and the 3 books i have
> arent
> helping so, if anybody can help, i would appreciate it.
>
> Thanks,
>
> Steve
>
>
...helmut Guest
-
oppels #3
Re: Help with an IF THEN statement
Thanks for the reply.
I will show you what I have tried, but don't laugh or call me bad words.....
like I said I don't know much about this.
I havent gotten to the point of changing the select box yet as I dont know how
to do it.
I'm using an access database, coldfusion mx
Attached is the code.
thanks
steve
<cfset TodayDate = Now()>
<cfquery name="levelofservice" datasource="tracker">
SELECT *
FROM levelofservice
</cfquery>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<!--- Set LOS --->
<cfif IsDefined("FORM.los") AND #FORM.los# NEQ "">
'#FORM.los#'
</cfif>
<cfset los=99214>
<cfif los IS 99212>
RVU is .45
<cfelseif los IS 99213>
RVU is .67
<cfelseif los IS 99214>
RVU is 1.1
<cfelseif los IS 99202>
RVU is .88
<cfelseif los IS 99203>
RVU is 1.34
<cfelseif los IS 99394>
RVU is 1.36
<cfelseif los IS 99395>
RVU is 1.36
<cfelseif los IS 99396>
RVU is .153
<cfelseif los IS 99397>
RVU is 1.71
<cfelseif los IS 99384>
RVU is 1.53
<cfelseif los IS 99385>
RVU is 1.53
<cfelseif los IS 99386>
RVU is 1.88
<cfelseif los IS 99387>
RVU is 2.06
<cfelse>
NULL
</cfif>
<form name="form1" id="form1" method="POST" action="">
<table width="" border="1" cellspacing="0" cellpadding="5">
<tr>
<td colspan="3" bgcolor="#CCCCCC"><div align="center"><strong>RVU
TRACKER</strong></div></td>
</tr>
<tr>
<td><div align="center"><strong>DOS</strong></div></td>
<td><div align="center"><strong>LOS</strong></div></td>
<td><div align="center"><strong>RVU</strong></div></td>
</tr>
<tr>
<td align="center"><input type="text" size="10" name="dos"
value="<cfoutput>#DateFormat(TodayDate, "mm/dd/yyyy")# </cfoutput>" />
</td>
<td align="center"><select name="los">
<option value=""> </option>
<cfoutput query="levelofservice">
<option value="#levelofservice.Proc#">#levelofservice.Proc #</option>
</cfoutput>
</select></td>
<td align="center"><select name="rvu">
<option value=""> </option>
<cfoutput query="levelofservice">
<option value="#levelofservice.WorkRVU#">#levelofservice.W orkRVU#</option>
</cfoutput>
</select></td>
</tr>
<tr>
<td colspan="3"><div align="right">
<input type="submit" name="Submit" value="Submit">
</div></td>
</tr>
</table>
<input type="hidden" name="MM_InsertRecord" value="form1">
</form>
</body>
</html>
oppels Guest
-
Julian Roberts #4
Re: Help with an IF THEN statement
Your logic is wrong, IMHO. You don't really need to insert both values into
the table. You can insert one value and get the other value by joining the
main table to the look-up table. Alternatively, if you wanted to write both
fields to the database, you could use javascript to write the selected
option of the dropdown list to hidden box and insert the value in hidden box
into the db.
--
Jules
[url]http://www.charon.co.uk/charoncart[/url]
Charon Cart 3
Shopping Cart Extension for Dreamweaver MX/MX 2004
Julian Roberts Guest
-
oppels #5
Re: Help with an IF THEN statement
like I said I really havent a clue. I hope that "IMHO" is a term of endearment. I went to your web site and see you have something similar there but it is written for ASP. Steve
oppels Guest



Reply With Quote

