Oracle Apex

How to Add, Display, and Enlarge an Image in Oracle Apex

How to Add, Display, and Enlarge an Image in Oracle Apex
Written by shohal

How to Add, Display, and Enlarge an Image in Oracle Apex

Step 1: Create a blank page and then under page create two region in between region create page item.

Step 2: In page upload, Show and Zoom In/ Out Image declare function code:

function getURL(input) {
 if (input.files && input.files[0])
 {
 var reader=new FileReader();
 reader.onload = function(e){
 $('#upimag')
 .attr('src',e.target.result);
 };
 reader.readAsDataURL(input.files[0]);
 }
}

function zoom(){
 var divlClass=$('#imgdiv').attr('class');
 if (divlClass==="ex"){
 $('#imgdiv').css('cursor','zoom-in');}else
 if ( divlClass=== "exZoom" ) {
 $('#imgdiv').css('cursor','zoom-out');}
 }


function my_class(){
 var divlClass= $('#imgdiv').attr('class');
 if(divlClass=== "ex"){
 $("#imgdiv").removeClass("ex");
 $("#upimag").removeClass("ex");
 $("#imgdiv").addClass("exZoom");
 $("#upimag").addClass("exZoom");} else
 if(divlClass==="exZoom"){
 $("#imgdiv").removeClass("exZoom");
 $("#upimag").removeClass("exZoom");
 $("#imgdiv").addClass("ex");
 $("#upimag").addClass("ex");}
 }

Then declare Inline code:

.ex
    {
    height:60px ;
    width:70px;
    padding:2px ;
    }

.exZoom 
    {
    height:300px;
    width:400px;
    padding:0px;
    }

In Show Image : HTML Code

<div align="center">
    <div id="imgdiv" class="ex">
    	<img alt="" class="ex" id="upimag" onclick="my_class(); zoom();" onmouseover="zoom();" src="#" />
 	</div>
</div>

In page P9999_UPLOAD_IMAGE CSS

πŸš€

If you’d like me to proceed with any of these, pleaseΒ just let me know from the siteΒ techtweet.xyz!Β Also if you need to learn something new than subscribe YouTube :Β ASP.NET With SQL SERVER

About the author

shohal

I have profession and personal attachment with custom ERP Software development, Business Analysis, Project Management and Implementation almost (36) ,also Oracle Apex is my all-time favorite platform to developed the software. Moreover i have some website development experience with WordPress. For hand on networking experience DevOps and CCNA, it create me a full package. Here are some core programming language with networking course i have been worked: Oracle SQL ,PL/SQL,Oracle 19c Database , Oracle Apex 20.1,WordPress,Asp.Net ,MS SQL ,CCNA ,Dev Ops, SAP SD

Leave a Comment