cancel
Showing results for 
Search instead for 
Did you mean: 

Enable/disable htmlb:link element

Former Member
0 Kudos

Please help

I've a requirement to enable/disable a link dynamically on a BSP page, Please advise.



<htmlb:link  
id       = "xyz"

            linkType =
"FUNCTION"

           
onClick  = "EH_ONINC"

           
text     = "In confidence" />

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member210661
Active Contributor
0 Kudos

Hi Sap Noob,

could you please explain your requirement elaborately... if possible provide screen shorts..

Regards,

Srinivas.

Former Member
0 Kudos

I need to display a link under an assignment block of a bsp page that is used for navigation to other windows. I have defined a htmlb:link element, and would want to disable the link conditionally. Also, please let me know if there is any other way of achieving this other than having a context attribute. Most appreciated.

deepika_chandrasekar
Active Contributor
0 Kudos

Hi,

When you don wnat link then for that condition use other tag instead of link tag in bsp page.

<% if lv_link = 'X' . %>.

<htmlb:link   id       = "xyz"

            linkType =
"FUNCTION"

           
onClick  = "EH_ONINC"

           
text     = "In confidence" />

 

<% else. %>

<thtmlb:label for     = "xyz"

                        text    = "xyz"

                        tooltip = "xyz" />

<% endif %>

Regards,

Deepika

former_member210661
Active Contributor
0 Kudos

Hi,

you can use the styles for displaying the link dynamically ..

try this..

in your .html write like this..

<style>

a:link {

     text-decoration: none;

}

a:visited {

     text-decoration: none;

}

a:hover {

     text-decoration: underline;

}

a:active {

     text-decoration: underline;

}

</style>

<htmlb:link   id       = "xyz"

             linkType = "FUNCTION"

             onClick  = "EH_ONINC"

             text     = "In confidence" />

Regards,

Srinivas.

former_member210661
Active Contributor
0 Kudos

Hi,

have you tried above example..:)

Regards,

Srinivas.

deepika_chandrasekar
Active Contributor
0 Kudos

Hi,

When you want hyperlink using condition use htmlb tag link when you dont want link use tag text.

<% if lv_link = 'X' . %>.

<htmlb:link   id       = "xyz"

            linkType =
"FUNCTION"

           
onClick  = "EH_ONINC"

           
text     = "In confidence" />

<% else. %>

<thtmlb:label for     = "xyz"

                        text    = "xyz"

                        tooltip = "xyz" />

<% endif %>

Regards,

Deepika.