Skip to main content
Inspiring
September 23, 2008
Question

OOP in HTML ???

  • September 23, 2008
  • 1 reply
  • 171 views
Relative newbie here and not entirely sure this is the right forum vis a vis the cfusion forum I will cross post in as well (apologies for this breach of etiquette) but I've taken the Lynda courses and used various books as resources but can't seem to find a reference to:

one area of a web page (say left most) is used for search terms, another (say middle) is used for returned results listing and a third area for the selected "page" from the list to be displayed.

I'm pretty sure this can be done with frames but for various reasons I am reluctant to use frames or if possible even javascript. Moreover, correct me if I am wrong but best practices suggest each area above could/should be its own cfc and if so how can I make it so that (say) the middle and/or right hand areas display only upon being "called" ( I've played with visibility: hidden; ).

As well, I realize this is much of what flash/flex enables but I similarly want to stay as basic as possible for now.

As always, thanks in advance.
    This topic has been closed for replies.

    1 reply

    Inspiring
    September 23, 2008
    without javascript you will not be able to achieve this, coldfusion or not.

    from your description it looks like what you are after is reloading
    parts of your page without reloading the whole page. this is basic ajax
    functionality, and all you need is built into CF8. it has the <CFDIV>
    and <CFLAYOUTAREA> tags and ColdFusion.navigate(),
    ColdFusion.Ajax.submitForm() and AjaxLink() built-in functions, which,
    in various combinations, will allow you to easily achieve what you want.

    to use CFCs or not for this is up to you - you do not have to. CFCs are
    useful for code re-use and web services, so if you are not planning to
    reuse the code (meaning functions) behind this page, going CFC way will
    probably only complicate things for you, especially if you are new to
    the CFC concept.

    if you do not already have a copy of CF 8 Developer's Guide and CFML
    Reference, i suggest you download those from adobe's website - they are
    free in PDF format.

    you can, of course, achieve same functionality without CF8, just by
    using javascript. in this case look into modern ajax-enable js
    frameworks like jQuery.


    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com/