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 8315847
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T21:13:27+00:00 2026-06-08T21:13:27+00:00

I am working on an PhoneGap application in which I am saving user’s name

  • 0

I am working on an PhoneGap application in which I am saving user’s name , number and Email , after that I am displaying that data to another page in list – view. That has been done very successfully. But now when I want to store Image of user in my local Storage, I am getting the path of image instead of Image.

I am saving my data in this way :

<SCRIPT Language="JavaScript" charset="utf-8" type="text/javascript">

 var userName, userNumber, userEmail, userImage ;

 function showAndClearField(frm)
{


   userName = frm.name.value;
   userNumber = frm.number.value;
   userEmail = frm.email.value;
  if (frm.name.value == "" )
      {
        alert("Please enter your name!")
      }
  else if(frm.number.value == "")
  {

 alert("Please enter your number!")

 }
   else if(frm.email.value == "")
   {
     alert("Please enter your Email !")
   }
 else
{                

 alert("Name : " + userName + '\n' + " Number: " + userNumber + '\n' + "  Email: " + userEmail  )

 frm.name.value = ""
  frm.number.value = ""
  frm.email.value = ""


  var db = window.openDatabase("TestingDemo", "1.0", "PhoneGapTesting Demo", 200000);
   db.transaction(populateDB, errorCB, successCB);

  }


   function populateDB(tx)
     {

      tx.executeSql('INSERT INTO DEMO (id, data, userName, userNumber, userEmail, userImage) VALUES (1, "Third row", "'+ userName +'" , "'+ userNumber +'" , "'+ userEmail +'", "'+ userImage +'")');

      }

While displaying data I am using following code :

 var nameOfUser , numberOfUser , emailOfUser, imageOfUser;


  for (var i=0; i<len; i++)
  {
     nameOfUser = results.rows.item(i).userName;

     numberOfUser = results.rows.item(i).userNumber;

     emailOfUser = results.rows.item(i).userEmail;

     imageOfUser = results.rows.item(i).userImage;



    numArr.push({ name : nameOfUser  , number  : numberOfUser  , email : emailOfUser, image : imageOfUser });  


   }

 function createCheckboxes(){
     $("#createBtn").remove();

     $("#content").append('<fieldset id="cbFieldSet" data-role="controlgroup" style = "padding : 20px" >');




    var length = numArr.length;

    for(var i=0;i<length;i++)
     {


    $("#cbFieldSet").append('<input type="checkbox" name= "cb-'+i+'" id="cb-' + i +'" number = "'+numArr[i].name+'"/>  <label for= "cb-'+i+'">'  +   "Name :  " + numArr[i].name + ' <br>' + "Email : " + numArr[i].email  +' <br>' + " Number " +  numArr[i].number +' <br>' +  numArr[i].image + ' <br><br> </label>' );


   alert("List Created !");

   }

   alert("Out of For loop !");      

   $("#content").trigger("create");
   alert("Content Created !");
  $("#showBtn").css("visibility","visible");
  }

  function showSelectedNames(){
   var count = $("#cbFieldSet input:checked").length;
   var str = '';
   for(i=0;i<count;i++){
   str += ' '+$("#cbFieldSet input:checked")[i].value;
 }
 alert("You selected----"+str);
}


                </script>

How the view I am getting is :

This how image path is displaying instead of image

  • 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-06-08T21:13:28+00:00Added an answer on June 8, 2026 at 9:13 pm

    i do not know about this particular program,

    but i do know that you are passing the image location as an argument, (text).

    the other arguments are also text, and you have no done anything differently with the image argument to have the UI display an image. maybe you are missing image tags, or an “getImage(location)” type function.

    edit:

    <img src="PATH" />
    

    you need to put PATH as image location and this is what will display it.

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

Sidebar

Related Questions

I'm working on an android tablet application using phonegap in which i need to
I developed an application in the phonegap which is working good in the android
I have a Phonegap/jQuery application which is working great, however in one area the
hi i have a fully working phonegap application with a number of files (both
We are currently working on the finishing touches of an application which uses Phonegap
I'm currently working on a PhoneGap application that uses jQuery, jQuery mobile and a
I'm working on a project which involves a website, and after that is done,
I'm working on phonegapp application. My application has a form which user should fill.I
I'm working on a Phonegap application.I have used header for every page. But when
So here's my problem. I'm currently working on a PhoneGap application using jQuery Mobile

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.