Help for a CF noob

I want to write a toggle color switch into a CF page with a
data table on it
something like this PHP -
<tr<? $toggle=!$toggle; echo($toggle?' class="even"':'
class="odd"'; ?>>
What would that look like in CF?
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================

That's cool. I may do that, then! Thankee....
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"Tom Muck" <[email protected]> wrote in
message
news:[email protected]...
>A little javascript would do it too:
>
> <script>
> function colorTable() {
> var tableRows =
>
document.getElementById('mytable').getElementsByTagName('tr');
> for(var i=0; i<tableRows.length; i++) {
> tableRows
.className = (i%2==0) ? 'even':'odd';
> }
> }
> </script>
>
> onload="colorTable()"
>
> Tom
>
> "Murray *ACE*" <[email protected]>
wrote in message
> news:[email protected]...
>> 50 or so pages, each with 200 - 1000 rows? I don't
think so.
>>
>> But this will do the trick, I believe.
>>
>> <cfset toggle = toggle + 1><tr
class="#IIF(toggle MOD 2, DE('odd'),
>> DE('even'))#">
>>
>>
>> --
>> Murray --- ICQ 71997575
>> Adobe Community Expert
>> (If you *MUST* email me, don't LAUGH when you do
so!)
>> ==================
>>
http://www.dreamweavermx-templates.com
- Template Triage!
>>
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
>>
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
>>
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
>> ==================
>>
>>
>> "Tom Muck" <[email protected]> wrote
in message
>> news:[email protected]...
>>> Does this table have hundreds or thousands of
rows? Much easier to apply
>>> class="even" to every other row wtih ctrl>y.
It would take about two
>>> minutes to do a few hundred rows.
>>>
>>> Tom
>>>
>>> "Murray *ACE*"
<[email protected]> wrote in message
>>> news:[email protected]...
>>>>I am doing a 'table-wide' find and replace,
finding <tr> and replacing
>>>>with <tr<?php ... ?>>.
>>>>
>>>> It works fine in PHP. I just need to know
how to do the same in CF.
>>>>
>>>> --
>>>> Murray --- ICQ 71997575
>>>> Adobe Community Expert
>>>> (If you *MUST* email me, don't LAUGH when
you do so!)
>>>> ==================
>>>>
http://www.dreamweavermx-templates.com
- Template Triage!
>>>>
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
>>>>
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
>>>>
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
>>>> ==================
>>>>
>>>>
>>>> "Tom Muck"
<[email protected]> wrote in message
>>>> news:[email protected]...
>>>>>
>>>>> "Murray *ACE*"
<[email protected]> wrote in message
>>>>>
news:[email protected]...
>>>>>> The heck you say.
>>>>>>
>>>>>> I've done this many times in PHP -
>>>>>>
>>>>>> $toggle=!$toggle;
echo($toggle?"odd":"even");
>>>>>
>>>>> The heck you say. That does absolutely
nothing unless it's in a
>>>>> loop...or unless you copy/paste into
every row. If you are doing that,
>>>>> then this code is identical:
>>>>>
>>>>> class="odd"
>>>>> class="even"
>>>>>
>>>>> Tom
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>

Similar Messages

  • Time Capsule help for a complete noob to MacBook

    Hi everyone
    This is been killing me for about 2 months.  Currently living in an annex down the end of my girlfriends fathers garden.  The wifi doesn't reach so I got a Time Capsule so I could use it as a router.
    We've got a cable and it's run from the Time Capsule, down the garden, into the house and plugged into router in the house.
    That's where I'm now stuck.  I've messed about with it and now my Macbook AirPort won't even recognise my Time Capsule.
    This really needs to be in moron terms as I'm clueless.  I've spent all this money and can't get it to do what I wanted it to do.
    Any help is appreciated, so thanks in advance.

    Hi LD.
    Thanks for the reply.  My MacBook won't even recognise the Time Capsule, I've messed about with the netowrk settings too much I think. 
    I'm really really stuck.

  • GetYear help for a complete noob

    Hey.
    I'm creating a sql data set for my data model that goes like this:
    select     "Credit Memo"."Cm Fecha Creacion" as "Cm Fecha Creacion",
         "Medidas CM (Nivel RF)"."Cm Monto Total" as "Cm Monto Total",
         "Medidas RF (Nivel RF)"."Rf Monto Total" as "Rf Monto Total"
    from     "SAG"."Medidas RF (Nivel RF)" "Medidas RF (Nivel RF)",
         "SAG"."Medidas CM (Nivel RF)" "Medidas CM (Nivel RF)",     
         "SAG"."Credit Memo" "Credit Memo"
    where YEAR("Credit Memo"."Cm Fecha Creacion") = YEAR(:p_year)
    but i get into 2 errors when doing this.
    1)When saving the data set The YEAR(:p_year) errors out
    2)If I put where YEAR("Credit Memo"."Cm Fecha Creacion") = :p_year (no year function on the right side)
    it saves but when running the xml data samle I get "parsing error"
    I've went thought this forum. And i got to post recommending function like <?xdoxslt:get_year(‘2000-04-08’, $_XDOLOCALE)?>.
    I have no clue where I can put them, its clear that SQL editor is not the place, right?.
    Is there any XML editor for my data sets. Is the "code" view intended for this? How could I use it in that case?
    Thanks!

    Hi LD.
    Thanks for the reply.  My MacBook won't even recognise the Time Capsule, I've messed about with the netowrk settings too much I think. 
    I'm really really stuck.

  • Creating search help for a field in AdHoc Query

    Hi
    We have created an infoset based on LDB PCH.
    (The infoset contains object type O only).
    For the object-id field the users want search help when choosing this field for selection.
    Using "start via selection screen" does not give a good solution.
    Can anyone explain how I can create search help for fields in an infoset?
    Regards
    Kirsten

    Hi
    We have created an infoset based on LDB PCH.
    (The infoset contains object type O only).
    For the object-id field the users want search help when choosing this field for selection.
    Using "start via selection screen" does not give a good solution.
    Can anyone explain how I can create search help for fields in an infoset?
    Regards
    Kirsten

  • Need to restrict values in F4 help for Batch Characteristic

    Hi,
    I need to restrict values in F4 Help for a batch characteristic based on values entered for another characteristic. I could not find any BADI or Exit for this purpose. There is a BADI CACL_VALUE which is triggered after an entry is selected from dropdown list but nothing when we press F4. I thought of using Object Dependency but I need to write a programming logic for the requirement. Please let me know if there is any way to write program in Object Dependency or any other way for this requirement.
    Regards,
    Nikhil

    Hi nikhil simha,
    first of all, find out which search help is called.
    [Hierarchy of the Search Help Call|http://help.sap.com/saphelp_nw70/helpdata/en/0b/32e9b798da11d295b800a0c929b3c3/frameset.htm]
    may help you.
    If you know the search help, you may enhance it, but first of all you should check the where-used-list and make sure that the search help shows the requested behavior only in the context where you want it to.
    If it is your own program, you may be better off to create your own search help and define the triggering fields as search help interface input fields. Then you can use the values to filter results.
    Regards
    Clemens

  • Search Help for Vendor Feild not getting populated in the Screen Element

    Hi Everyone,
    In transaction Miro, I get a POP-UP for Invoicing Party i.e. Vendor and Users required a custom search help.
    The Search help for Vendor(LIFNR) is KRED_C and i appended a Z search help under this.
    Now that the search help exists and I can drill down the values too but when i select/choose any value,  that value is not getting populated in Screen feild.
    is there any validation I need to do for this.
    Please suggest me... I checked SDN there are many things but i couldn't figure out wat i need to do and where I need to modify.
    Regards,
    Raj

    Dear Hema,
    Could you please tell me how many internal tables you are using to store the data for display.
    I observerd that you have lt_stock and lt_mat2 declared in the part of the program
    >DATA: lv_stock TYPE lty_stock.
    >DATA: ltmat2 TYPE TABLE OF lty_mat.
    you have displayed above, however you are also using ls_stock and lv_stock .
    >IF p_ztotal = ' '. "line
    >WRITE 18 ls_stock-matnr.
    >WRITE 38 lv_stock-strgr.
    >
    >ELSEIF ztotal = 'S'.                             "subtotal
        >WRITE: 15 ls_stock-nrmit.
        >WRITE 32 lv_stock-dispo.                    
        >WRITE 43 lv_stock-fevor.                      
      >ELSE.                                            "total
        >WRITE: 15 'TOTAL'(016), ls_stock-prgrp.
    >
      >ENDIF.
    Are those for displaying some other information?
    Also the problem of display you are facing can also be because there are no records to be displayed which satisfies the selection criteria.
    Best Regards,
    Rajesh.
    Please reward points if found helpful.

  • Search help for SKAT-SAKNR OR SKAT-SAKNR is not working

    Hi All,
    I have created a Search Help for F4 in a dialog program for SKAT-SAKNR OR SKAT-SAKNR. While i click F4 on that field, it displays blank values.
    Here is the module:
    module HELP_FOR_SAPGL_ACC input.
      CLEAR t_SAPGL.
      SELECT  SAKNR TXT20
        FROM  SKAT
        INTO  CORRESPONDING FIELDS OF TABLE t_SAPGL UP TO 1000 ROWS
        WHERE SPRAS = SY-LANGU.
       WHERE L_GL_ACC = v_FIELD_VALUE-FIELDVALUE.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
        DDIC_STRUCTURE         = ' '
          RETFIELD               = 'SAKNR'
        PVALKEY                = ' '
         DYNPPROG               = PROGNAME
         DYNPNR                 = DYNNUM
         DYNPROFIELD            = 'SKA1-SKANR'
        STEPL                  = 0
        WINDOW_TITLE           =
        VALUE                  = ' '
         VALUE_ORG              = 'S'
        MULTIPLE_CHOICE        = ' '
        DISPLAY                = ' '
        CALLBACK_PROGRAM       = ' '
        CALLBACK_FORM          = ' '
        MARK_TAB               =
      IMPORTING
        USER_RESET             =
        TABLES
          VALUE_TAB              = t_SAPGL
        FIELD_TAB              =
        RETURN_TAB             =
        DYNPFLD_MAPPING        =
      EXCEPTIONS
        PARAMETER_ERROR        = 1
        NO_VALUES_FOUND        = 2
        OTHERS                 = 3
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    endmodule.   
    In the above code I am selecting 1000 rows from SKAT table and in the Search Help Popup it is also displaying 1000 rows but all are blank.
    Please help me.
    Regards,
    Avaneet

    Hi check my weblog on search help exit codeing..
    https://wiki.sdn.sap.com/wiki/x/du0
    \* Prepare for output
    CALL FUNCTION 'F4UT_RESULTS_MAP'
    TABLES
    shlp_tab = shlp_tab
    record_tab = record_tab
    source_tab = lt_result
    CHANGING
    shlp = shlp
    callcontrol = callcontrol
    EXCEPTIONS
    illegal_structure = 1
    OTHERS = 2.
    IF rc = 0.
    callcontrol-step = 'DISP'.
    ELSE.

  • I have problem with buying in games , I got the massage that the purchased can not be completed , please contact iTunes support.. I need help for my case please

    I have problem with buying in games , I got the massage that the purchased can not be completed , please contact iTunes support.. I need help for my case please

    http://www.apple.com/support/itunes/contact/

  • Search help for date field in Editable ALV

    Hello Friends,
    I am using editable alv using 'reuse_* '.
    I have used date as input field. While creating fieldcatlog also i have  declared dat as a mkpf-budat.
    But i am not getting serach help for date in output.
    Is it possible with reuse or i have to go by object oriented ?

    Hi,
    Just pass the Edit option of the fieldcatalog for those specific fields...
    fcat-edit = 'X'.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program       = sy-cprog
          i_callback_pf_status_set = 'PF_STATUS_SET'
          i_callback_user_command  = 'USER_COMMAND'    "<----  pass this
          i_callback_top_of_page   = 'TOP'
          is_layout                = it_layout
          it_fieldcat              = it_fcat
          i_default                = 'X'
          i_save                   = 'A'
          it_events                = it_event
        TABLES
          t_outtab                 = it_final
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.
    *&      Form  USER_COMMAND
    *       text
    *      -->R_UCOMM      text
    *      -->RS_SELFIELD  text
    FORM user_command USING r_ucomm LIKE sy-ucomm
                            rs_selfield TYPE slis_selfield.
      CASE r_ucomm.
        WHEN '&DATA_SAVE'.                "<-------check this
          PERFORM save_data.
      ENDCASE.
    ENDFORM.                    "USER_COMMAND

  • How to create a F4 help for a report selection screen field

    hi,
    can any one guide me to create F4 help for a field in a selection screen in a report program,plz give me a sample code

    hi,
    Here are the following ways
    1.with the help of match code objects we can create the F4 Functionality for Field.
    Syntax is :
    PARAMETERS: p_org LIKE t527x-orgeh MATCHCODE OBJECT zorg.
    2. One more thing is we can do it with Search Help's also.
    3. Even we can do it HELP Views also.
    Help Views:
    You have to create a help view if a view with outer join is needed as selection method of a search help
    The selection method of a search help is either a table or a view. If you have to select data from several tables for the search help, you should generally use a database view as selection method. However, a database view always implements an inner join. If you need a view with outer join for the data selection, you have to use a help view as selection method.
    All the tables included in a help view must be linked with foreign keys. Only foreign keys that have certain attributes can be used here. The first table to be inserted in the help view is called the primary table of the help view. The tables added to this primary table with foreign keys are called secondary tables.
    The functionality of a help view has changed significantly between Release 3.0 and Release 4.0. In Release 3.0, a help view was automatically displayed for the input help (F4 help) for all the fields that were checked against the primary table of the help view. This is no longer the case in Release 4.0.
    As of Release 4.0, you must explicitly create a search help that must be linked with the fields for which it is offered (see Linking Search Helps with Screen Fields ).
    Existing help views are automatically migrated to search helps when you upgrade to a release higher than 4.0.
    A help view implements an outer join, i.e. all the contents of the primary table of the help view are always displayed. You therefore should not formulate a selection condition for fields in one of the secondary tables of the help view. If records of these secondary tables cannot be read as a result of this selection condition, the contents of the corresponding fields of the secondary table are displayed with initial value.
    <REMOVED BY MODERATOR>
    Edited by: Alvaro Tejada Galindo on Feb 15, 2008 3:15 PM

  • Reg : F4 help for custom fields in ALV report

    hi friends..
    in my internal table i have fields including 1 custom field..
    DATA : BEGIN OF i_final OCCURS 0,
      pernr LIKE p0000-pernr,
      begda LIKE p0000-begda,
      plans LIKE ZPOSITION-plans,  (custom)
      werks LIKE pspar-werks,
      end of i_final.
    i want to display this i_final table in alv. for that i genetrate one fieldcatalog
    PERFORM fcat USING:
                      'I_FINAL' 'PERNR' 'P0000' 'PERNR' '15' 'X' '',
                      'I_FINAL' 'BEGDA' 'P0000' 'BEGDA' '10' 'X' '',
                      'I_FINAL' 'PLANS' 'ZPOSITION' 'PLANS' '8' 'X' '',
                      'I_FINAL' 'WERKS' 'PSPAR' 'WERKS' '14' 'X' ''.
    in custom table zposition, i maintain serch help for custom field "PLANS".
    then i used reuse_alv_grid_display.. for all the std fields along wit custom fields
    i got f4 all std fields but for my custom i am not getting the f4 help
    how can i get the F$ help for this custom fields Zposition-plans..
    plz give some idea

    Hi
    In that Ztable against the field
    PLANS give the check table name as  <b>T528B</b>
    then it will automatically give the search help
    or you can create your own search help(elementary) and add to that field
    Reward if useful
    regards
    Anji

  • How to add a search help for a field in alv?

    HI!Everyone ,
    i want to add a search help created by myself for one field in alv,
    and i want to use this function "HELP_VALUES_GET_WITH_TABLE".
    can anyone help me ?
    thanks!

    HI,Vijay.
    My code like this :
          PERFORM build_fcat.
          PERFORM build_objects.
          PERFORM layo_build.
          PERFORM set_drdn_table .
          CALL METHOD alv_grid->set_table_for_first_display
            EXPORTING
             i_structure_name = 'STU_S'
              is_layout        = s_layo
            CHANGING
              it_outtab        = itab_out
            it_fieldcatalog  = i_fcat
            ."Period
          IF sy-subrc <> 0.
            EXIT.
          ENDIF.
    for example, there is a field 'UNAME' IN Structure 'STU_S',
    i want to add a search help for 'UNAME'.
    the 'UNAME'  is not users in SAP R/3 , i want to add some data by myself or from a table .

  • How to add search help for field in ALV object

    Hello,
    In a program, we use ALV object ( container) to create a liste like : field1, field2 .. but when display we do not have search help for this . Could you please help me how to add match code in this case for field 1 and field2, We use set_table_for_first_display
    Thanks,

    Hi,
    when you define your field catalogue you can create data elements with search help in se11 and use them for field 1 and field 2.
    But maybe it is enough to use data elements belonging to a domain with a value help and to set field F$AVAILABL in the field catalogue or to fill the name of the field CHECKTABLE.
    Regards,
    Klaus

  • F4 - Help for field in ALV Grid Output

    Hi,
    I generated a report which gives output in ALV Grid output.
    In the output, 1 of the field is editable.Here, for this field I need to have my own F4-Help.
    I think the procedure to be followed is:--
    Create a Search Help in SE11.
    Link the Search Help to the editable field.
    Please let me know if its the correct procedure.
    I f yes, how can I link user defined Search Help to the editable field?
    Thanks,
    Shivaa........

    Hi siva,
    you can also do that way.
    while filling the fieldcatalog use the parameter F4AVAILABL
    for more info check
    F4 help in ALV Grid...
    f4 help for a field in alv grid
    hope it helps you
    Thanks!
    Edited by: Prasanth on Mar 6, 2009 3:59 PM

  • Required F4 help for Requestioner(EBAN-AFNAM) in ME51N,ME52N & ME53N

    Hi Experts,
    Need F4 help for Requistioner(EBAN-AFNAM) in Tran. ME51N, the system is ECC 5.0,
    How can i meet my requirement., kindly revert back <removed by moderator> if u have solution for this.
    Regards,
    Niranjan.G
    Edited by: Thomas Zloch on Jun 21, 2010 4:35 PM

    Hi,
    There are 2 possibilities.
    For these you need to get the Access key.
    One is just create the search help and assign this search help to this field in the screen attributes.
    Second one Just create the POV for this field.
    With Regards,
    Sumodh.P

Maybe you are looking for

  • Accessing External Hard Drive on PC

    I have my airport extreme connected to my PC via ethernet and connected wirelessly to my Mac Book. I cannot connect to the external hard drive through my PC. Whenever I enter my base station password I keep getting an error message that the user is n

  • 2008 Macbook Partitioned HDD Upgrade

    I want to upgrade my Pre-unibody 2008 Macbook HDD with a larger drive. I have partitioned my drive to run Win7 and I would like to copy both OSs to the new hard drive. If I buy the case to first use the new hard drive externally to partition it is th

  • Audio Links Broken in IE

    Hi, My band web site is functioning perfectly on Firefox and Safari, but when browsing with IE, the audio links just display a broken link. I'm thinking it has something to do with quicktime, because when you click on a song in Firefox, it opens a ne

  • 5s 8.1 iOS: Restore errors 4005. Won't update or restore

    Hi Guys, I downloaded the 8.1 update via the latest iTunes and connected my 5s to update. The update failed and i got the 4005 restore error: iOS: Restore errors 4005, 4013, and 4014 Now when turn on the 5s it just shows the symbol to connect to iTun

  • Production order settle

    Hi Experts, Can anybody please tell me how to know whether production order is settled or not.