Hi, can anyone help with this Prob??
What Im trying to do is to set a variable using many CFIF statements. Enclosed within the CFIF Statements, I am trying to set a variable for CSS. It looks something like this:
<CFIF ISDEFINED ('form.heading') AND ISDEFINED ('Form.X') AND ISDEFINED ('form.Y')>
<CFSET HeadingX="#X#">
<CFSET HeadingY="#Y#">
<STYLE TYPE="text/css">
#positionheading
{
position:absolute;
top: <CFOUTPUT>#HeadingX#</cfoutput>px;
left: <cfoutput>#HeadingYY#</cfoutput>px;
}
</style>
<CFELSEIF ISDEFINED ('form.Section1Heading1') AND ISDEFINED ('Form.X') AND ISDEFINED ('form.Y')>
<CFSET Section1Heading1X="#X#">
<CFSET Section1Heading1Y="#Y#">
<STYLE TYPE="text/css">
#positionSection1Heading1
{
position:absolute;
top: <CFOUTPUT>#Section1Heading1X#</cfoutput>px;
left: <cfoutput>#Section1Heading1Y#</cfoutput>px;
}
</style>
ETC ETC,
However, WHen Coldfusion starts to process the CFIF statements, it fails when it encounters the curly Brackets "{". Are these not allowed within CFIF statements?
Am I doing something wrong or is there a work-around?
If any1 has any ideas, I would really appreciate it..
Many thanks
Sam...
What Im trying to do is to set a variable using many CFIF statements. Enclosed within the CFIF Statements, I am trying to set a variable for CSS. It looks something like this:
<CFIF ISDEFINED ('form.heading') AND ISDEFINED ('Form.X') AND ISDEFINED ('form.Y')>
<CFSET HeadingX="#X#">
<CFSET HeadingY="#Y#">
<STYLE TYPE="text/css">
#positionheading
{
position:absolute;
top: <CFOUTPUT>#HeadingX#</cfoutput>px;
left: <cfoutput>#HeadingYY#</cfoutput>px;
}
</style>
<CFELSEIF ISDEFINED ('form.Section1Heading1') AND ISDEFINED ('Form.X') AND ISDEFINED ('form.Y')>
<CFSET Section1Heading1X="#X#">
<CFSET Section1Heading1Y="#Y#">
<STYLE TYPE="text/css">
#positionSection1Heading1
{
position:absolute;
top: <CFOUTPUT>#Section1Heading1X#</cfoutput>px;
left: <cfoutput>#Section1Heading1Y#</cfoutput>px;
}
</style>
ETC ETC,
However, WHen Coldfusion starts to process the CFIF statements, it fails when it encounters the curly Brackets "{". Are these not allowed within CFIF statements?
Am I doing something wrong or is there a work-around?
If any1 has any ideas, I would really appreciate it..
Many thanks
Sam...