In Oracle Apex-
Click below link to see demo-
https://apex.oracle.com/pls/apex/f?p=S_MYDEMO:POSTXT:&APP_SESSION.:::::
Create page items as text field P3_TEXT1, then create dynamic action
as Get Focus > Items > name
Create True action > Set Value
give some value e.g., *
select affected element as jquery selector > .t-Form-itemText--post
Create True action > Execute JavaScript Code
$(".apex-item-text").focus(function (){
$(".t-Form-itemText--post").css('display','none');
$(this).next(".t-Form-itemText--post").css('display','inline').show();
$(this).next(".t-Form-itemText--post").animate({ color: "rgb( 150, 10, 160 )"},'slow');
});
https://apex.oracle.com/pls/apex/f?p=S_MYDEMO:POSTXT:&APP_SESSION.:::::
Create page items as text field P3_TEXT1, then create dynamic action
as Get Focus > Items > name
Create True action > Set Value
give some value e.g., *
select affected element as jquery selector > .t-Form-itemText--post
Create True action > Execute JavaScript Code
$(".apex-item-text").focus(function (){
$(".t-Form-itemText--post").css('display','none');
$(this).next(".t-Form-itemText--post").css('display','inline').show();
$(this).next(".t-Form-itemText--post").animate({ color: "rgb( 150, 10, 160 )"},'slow');
});
It's Done.
HTML Example:
<html>
<head>
<style>
#sp {display:none;color:red;}
</style>
<script type="text/javascript">
$("input").focus(function (){
$(this).next("#sp").css('display','inline').blink(2000);
});
</script>
</head>
<body>
<p>Field 1<input type="text" /><span id="sp"> mandatory</span></p>
<p>Field 2<input type="text" /><span id="sp"> mandatory</span></p>
</body>
</html>
No comments:
Post a Comment