Options

Javascript and RTC / Mobile devices

btasticbtastic Member Posts: 6
edited 2016-03-24 in NAV Three Tier
Hey,

I have developed a javascript addin where a blob field with an image get's extracted from NAV, encoded to base64 and then shown on the page via the javascript addin. The webclient does show the addin and the picture properly. However, the mobile/tablet client and the RTC do not show the picture.

Is there any way to achieve that my javascript addin will work on RTC and mobile devices?

Here's my code:
var image = null;
var navControlContainer = null;
var navImage = null;

	function InitializeImage(controlId) {			
		navControlContainer = $("#controlAddIn");
		navControlContainer.append('<div id="navImage"></div>');
		navImage = $("#navImage");				
	}
	
	function SetImageSize(height, width){
		image = new Image(width, height);      
		navImage.append(image);		
	}
	
	function LoadImage(base64str) {
		if(image==null){
			image = new Image(800,600);
			navImage.append(image);
		}
		
		image.src = 'data:image/jpeg;base64,' + base64str;
		image.style.height ='100%';
		image.style.width = '100%';
	}

Thank you

Best Answer

Answers

Sign In or Register to comment.