function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
enTran01enTran01 

showing a picture within an inputTextField after getting picture from phone

Im tryning to insert a picture into an inputTextArea after using the phongap plugin in my phone. Im able to retreive the image from my phone but after i insert that picture into the inputTextArea the picture does not show. However if I use an img tag it works

 



var pictureSource, destinationType
function onPhotoURISuccess(imageURI) { var postBox = document.getElementById(postBoxId); var newImage = document.createElement('img'); newImage.style.display = 'block'; newImage.width = '25'; newImage.height = '25'; newImage.src=imageURI; try{ postBox.appendChild(newImage); postBox.innerHTML = postBox.innerHTML + '<div>Local Picture</div>'; } catch(erro){ alert(erro); } }//end of pnPhotoURISuccess function getPhoto() { navigator.camera.getPicture(onPhotoURISuccess, onFail, { quality: 25, destinationType: navigator.camera.DestinationType.FILE_URI, sourceType: navigator.camera.PictureSourceType.PHOTOLIBRARY }); } function onFail(message) { alert('Failed because: ' + JSON.stringify(message)); }

 Here is the visualforce code

<apex:image id="AttachPic" value="{!URLFOR($Resource.Resources, 'resources/icons/file_blank.png')}" height="15px" width="15px" styleClass="postImage" onclick="getPhoto();" ></apex:image>  
                    <apex:outputPanel title="Attach">Attach</apex:outputPanel>
                    <br/>  
                    
                    <apex:inputTextarea id="postBox" styleClass="chatterPostBox" rows="2" value="{!postBody}" onclick="MyIds(this);">
                        
                        </apex:inputTextarea>