Working with Conditional Processing - macromedia COLDFUSION MX 7 Web Application Construction Kit [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

macromedia COLDFUSION MX 7 Web Application Construction Kit [Electronic resources] - نسخه متنی

Ben Forta, Raymond Camden, Leon Chalnick, Angela Buraglia

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید











  • Working with Conditional Processing


    Chapter 8, "Using ColdFusion," introduced two ColdFusion tags (<cfoutput> and <cfset>), functions, and variables. This chapter takes CFML one big step further, adding conditional and programmatic processing, the stuff that starts to add real power to your code.

    The code you wrote in the last chapter was linearColdFusion started at the top of the page and processed every line in order. And although that works for simple applications, more often than not you'll need to write code that does various things based on conditions, such as:

    • Displaying different messages based on the time of day or day of the week

    • Personalizing content based on user login

    • Informing users of the status of searches or other operations

    • Displaying (or hiding) options based on security level


    All these require intelligence within your code to facilitate decision-making. Conditional processing is the mechanism by which this is done, and ColdFusion supports two forms of conditional processing:

    • If statements, created using <cfif> and related tags

    • Switch statements, created using <cfswitch> and <cfcase>


    Let's start by taking a look at these in detail.


  • / 281