|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
html inside cfset
Hey all,
can you use html tags inside a cfset tag? |
|
#2
|
|||
|
|||
|
You can...but cfsavecontent is much more useful in such a situation.
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian. How to Post a Question in the Forums |
|
#3
|
|||
|
|||
|
Got around that problem doing something different, but I have a new problem now...
So I have some javascript validation, works fine. And I have a post page, with some custom error checking built in. If an error hits, it does a <cfset> of a variable and sets that variable to 1 and then loads an include of another page. So, on the page that is set as the include, I am doing this. Code:
<cfif #submitcheck# is 1> submitbutton = 0 </cfif> the "submitbutton" is a javascript variable inside the included page. What happens is, insted of setting the submitbutton variable to 0, it just writes submitbutton = 0 onto the page. So it is treating it like normal text. So I assume i'm missing something to tell it what's inside the cfif statement is actaully a javascript statement. Any thoughts? Thanks Caden |
|
#4
|
|||
|
|||
|
Is the <cfif> tag and the output you want to generate inside a Javascript <script> block along with the rest of the Javascript? It doesn't look like it.
|
|
#5
|
|||
|
|||
|
can you just put CF tags between <script language="javascript> tags?
|
|
#6
|
|||
|
|||
|
The answer to my question is, yes, yes you can.
|
|
#7
|
|||
|
|||
|
You can put CMFL code anywhere. It is all parsed by the CF server before anything is sent to the client.
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > html inside cfset |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|