Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7161553
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:35:10+00:00 2026-05-28T13:35:10+00:00

/******* works when Take Photo button clicked ********/ function takePicture() { var result =

  • 0
    /*******
    works when "Take Photo" button clicked
    ********/
function takePicture() {
    var result = blackberry.media.camera.takePicture(successCB);
}


/*******
post processing of photo click event
********/
function successCB(filePath) {
   try{
    blackberry.media.camera.close();
    var imagePath = "file://" + filePath;
    document.getElementById('images').setAttribute('src', imagePath.toString());
    document.getElementById("photoDetails").innerHTML = imagePath;
   }
  catch(e) {
        document.getElementById("photoDetails").innerHTML = e.ToString();
  }
}
//ConfigFile includes the following,  <access subdomains="false" uri="file:///store/home/user/camera/">

       //html portion of viewing photo
       <ul>
            <li id="Li1">
                <img id="Img1" alt="image" src="file:///store/home/user/camera/IMG-20120118-00001.jpg" /></li>
            <li id="photoDetails">
                <img id="images" alt="image" src="kkkoj" /></li>
        </ul>

the imagePath variable successfully prints => “file:///store/home/user/camera/IMG-20120118-00001.jpg”. but the photo is not showing up.

i don’t understand whats the problem with the code i have written. image path came alright.

Strangely when i hardcode the imagePath as a src of image it can show the image. but when i set it using javascript in successCB(), it doesn’t work. i tested the functionality of my javascript code in firefox. it works in basic html. i am using Blackberry 9700 with os 6 bundle 2921. i need immediate help. please i am stuck with this for a whole day

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T13:35:11+00:00Added an answer on May 28, 2026 at 1:35 pm

    You’re use of document.getElementById("photoDetails").innerHTML is the problem. .innerHTML replaces everything in between the opening and closing tags of <li id="photoDetails">. Since images is in photoDetails, it is getting erased with just the imagePath.

    If you want to display the imagePath, try adding a <div> or <span> and updating them with the path.

    Also, I don’t think you need the <access> element in your configuration file, since that is only used for accessing external servers.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using UIImagePickerController to take a photo from the camera. However, the I
I'm using the phone's camera in an Android app to take a photo. I'm
I am using the image picker to take a photo and then go to
My goal is to write a custom camera view controller that: Can take photos
In the iOS app I'm writing, we have an add photo button that's pretty
I need to take a photo someone has uploaded through a form, resize, merge
With the following code shows a preview of the camera vertically and it's works..
I'm presenting my camera using a popover. It works perfectly in my iPad. For
I work for an organization where we take raw MPEG-2 video files of lectures
Take the following lines of code that would work fine in a c# asp.net

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.