It is valid XHTML(or maybe it was part of the HTML 4.0 spec), actually all
upper case like that would not be if I remember correctly.  It was more or
less a joke on my part although it would be a good habbit for anyone to be
in.  Especially if they were ever to have to write code for things such as
cell phones.  You are not supposed to have attributes that do not equal
anything just like you are supposed to always have closing tags such as
</option> and when no closing tag available you end it with a " /" such as
<br />



On 3/9/06, Claude Schneegans <[EMAIL PROTECTED]> wrote:
>
> >>Even better <cfif ListElement IS
> GetCategoriesOutput.categorie_id>selected="selected"</cfif>
>
> Sorry, I don't see the point here? Is <OPTION SELECTED="selected"> legal
> in HTML? Even if yes, what is the advantage?
>
> Anyway, the whole loop could be optimized:
> Instead of
>
> <CFOUTPUT query="GetCategoriesOutput">
> 682 : <option value="#categorie_id#" <CFIF ISDEFINED ("PRSubmit_EDIT") AND
> ISDEFINED ("pre_existing")><cfloop index = "ListElement" list =
> "#Edit_Get_Selected_PressRel.pre_cat_id#"><CFIF #ListElement# =
> #GetCategoriesOutput.categorie_id#>selected</CFIF></cfloop></CFIF>>#cat_name#</option>
> 683 :   </CFOUTPUT>
>
> Try
> <CFOUTPUT query="GetCategoriesOutput">
>        <option value="#categorie_id#"<CFIF ISDEFINED ("PRSubmit_EDIT") AND
> ISDEFINED ("pre_existing") AND
> listFind(Edit_Get_Selected_PressRel.pre_cat_id, categorie_id)>
> selected</CFIF>>#cat_name#</option></CFOUTPUT>
>
>
>


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:234899
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to