Skip to Content
author's profile photo Former Member
Former Member

change color for link to action in table cell click

Hello

In a table a have columns made with link to action.

On click on one cell with link to action, I need to change the colour for that link (only in cell, not for column).

How can I achieve this?

Thanks

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 13, 2005 at 05:39 AM

    HI ,

    -

    -


    Try this code ...

    -

    -



    .initial2{font-weight:bold;background-color:lime}



    <!--

    /***********************************************

    • Rollover background-color button Script- © Dynamic Drive

    (www.dynamicdrive.com)

    ***********************************************/

    //Specify optional button target: "_new" for new window,

    or name of FRAME target (ie "myframe")

    var buttontarget=""

    function change(e, color){

    var el=window.event? event.srcElement: e.target

    if (el.tagName=="INPUT"&&el.type=="button")

    el.style.backgroundColor=color

    }

    function jumpto2(url){

    if (buttontarget=="")

    window.location=url

    else if (buttontarget=="_new")

    window.open(url)

    else

    parent[buttontarget].location=url

    }

    //-->

    -

    -


    Just copy the code into a html file and see the difference

    Hope it helps .

    Regards,

    J

    As you are new to forum let me explain the Forum points.

    If u satisfied with the answer ,close the thread by awarding points at the left side of this information.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 13, 2005 at 06:31 AM

    To change the visual appearance of a LinkToAction, you can use the LinkToAction.type property.

    See https://media.sdn.sap.com/javadocs/NW04/SP12/webdynpro/com/sap/tc/webdynpro/clientserver/uielib/standard/api/IWDLinkToAction.html#getType()

    To change this property for a link in a table cell, do this:

    Add an attribute "LinkType" under the context node used as the table's data source. The type of the attribute must be the DDIC type "com.sap.ide.uielementdefinitions.LinkType" (do not use Java native type WDLinkType).

    Bind property LinkToAction.type of the table cell editor to this attribute. Then you can control the link type in the i'th row via the attribute value in the i'th node element.

    Armin

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 16, 2005 at 02:11 AM

    Hell Armin

    Thank you for your answer.

    I can not add an atribute under my context node because has a dictionary structure binding. I tried to add the atribute outside the node, and to set the type property for link to action, but does not work how I expected.

    Beside that, when I click a cell in table, it will execute an action which refresh also the table.

    Now, I am stack in this.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.