TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Gnanavel Sekar
NA
8.4k
7.3m
Map the image path in jquery
Mar 3 2017 2:44 AM
Hi pal,
I have more than one project in one solution, am just displaying the image from folder but that folder exist in another project but in same solution.
Just assume i have one project called
Themes and another one orchard.web
this below script exists in themes project and image exists in orchard.web project..
the themes project is common for all layout that's why am here using. the images all exist under
~/UploadFiles/ folder.
$.ajax({
url: crudServiceBaseUrl,
data: { UserId: UD },
type: "Get",
dataType: 'json',
contentType: 'application/json; charset=utf-8',
success: function (result) {
if (result.ContactImg != null) {
----->here i want to assign the image to that image control
$(".Imgchange").attr('src', '
~/UploadFiles/
' + result.ContactImg.split('.')[0] + "_" + UD + result.ContactImg.split('.')[1]);
}
else {
$(".Imgchange").attr('src', '/OrchardLocal/Themes/Gentelella/Content/Images/img.jpg');
---->it's working fine due to in same project as well as it's static
}
}
});
Thanks in advance
Reply
Answers (
4
)
End Date must be greater than Start date using jquery
How to check if TextBox control has value in JQuery