Click here to Skip to main content
16,012,046 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,
Can anyone give me a codings or reference to get imagepath and its name from database using javascript...


Regards
vivek
Posted

1 solution

You can use JQuery to do an Ajax request to the web server, like:
JavaScript
 $.ajax({
    url: "ImageRetriever.java",
    type: "GET",
    data {
        imageId: 1234
    },
    success: function(result) {
        $("#imagePath").text(result);
    }
});


And then, in the server side, you have a Java servlet / PHP script / C# class that gets the image id, queries the database using that id, and returns the image path. Now, I would post this as well, but without further details (your server side language, how the database looks like, etc) I can't do that, as I'm basically blind
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900