Sunday 13 November 2016

Clickable display only item in oracle apex 5.0.4


You can use Jquery to achieve the same.

Let's take a look at below example.

Function and Global Variable Declaration
  1. $(function(){  
  2.     $('#P50_CLICK_DISPLAY').on('click'function(){  
  3.       $("#P50_HIDE").hide();  
  4.       $("#P50_SHOW").show();  
  5.       $("#P50_HIDE_LABEL").hide();    
  6.       $("#P50_SHOW_LABEL").show();   
  7.     })      
  8. })  

Three  items in same region(Static). here P50_CLICK_DISPLAY is a display only item and it's value is static. There are two more item which is Hide and Show.

Now, initially p50_show will be hidden on page load and p50_hide will be displayed.When user clicks on display only item's value then p50_show will be displayed and p50_hide will be hidden.

Execute when Page Loads
  1.  $("#P50_SHOW").hide();  
  2.  $("#P50_SHOW_LABEL").hide();  

Here we have hide the Label as well as item.
This can be done without using DA which is more convenient way in this scenario.

Css:
  1. #P50_CLICK_DISPLAY {   
  2.         text-decorationunderline;  
  3.         -webkit-text-decoration-colorred;  
  4.         -moz-text-decoration-colorred;  /* vendor prefix not required as of V36 */  
  5.          colorred;  
  6. }  

If you want to  redirect you can use :

$('#P50_CLICK_DISPLAY').wrap('<a href="Link_url"></a>') ;


Page : 50
Credentials : test/test

No comments:

Post a Comment

Show values in right side of shuttle

While working with select list and shuttle, when we want to display values into right side of shuttle depending upon selection from select ...