Click list item and display the image
I have a database table:
+ One column includes names of the employee
+ Another includes the path of the file of corresponding employee's images
I have added all the names into a JList
Now, what I want to do is that: When I click on the item in the list, the image of the employee corresponding to the item will display in the frame.
Could any of you help me?
Any help will be appreciated.
Thanks.
Hi Sunitha,
According to your description, my understanding is that you want to change the list title to an image.
I recommend to add the code below to the list page:
<script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script><script type="text/javascript">
$(document).ready(function (){
var s = "<img alt='SP' src='http://w2k81368:2116/SiteAssets/Test.jpg'>";
var $t = $("#DeltaPlaceHolderPageTitleInTitleArea span span a");
$t.html(s);
</script>
After that, the list title will change to the image and it will show allitems.aspx page when clicking the image.
Thanks,
Victoria
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected]
Victoria Xia
TechNet Community Support
Similar Messages
-
Spotlight lists items and shows preview images. BUT what about showing the path/location address of an item in my computer.
Especially important if I've put the item in the wrong folder and what to locate it without multi-steps. iMac OS X 10.5 was more useful.
Old OSX Spotlight function automatically displayed path/location within the machine: e.g. desktop/folder/sub-folder/item.
Can I make Spotlight show the path?Press option-command and the path is displayed at the bottom of the little preview window. Press command-return and the enclosing folder opens.
-
I run Windows-XP SP3 and I can't get the image from a Siemans Gigaset cam. There is an error in the cam code (a lacking rutine) . IE8 ignores this and displays the image anyway.
Is it possible to get a notification like Ignore/Abort/ Continue ???Does the documentation for that camera, or for the software with it, say anything about ActiveX or about H.264?
If so, it isn't compatible with Firefox - it doesn't do ActiveX and it doesn't support H.264 in the HTML5 standard. Microsoft just released a plugin for Firefox that adds H.264 support to Firefox, but IIRC that only covers Windows 7 - not WinXP. -
Hi,
I have : - IMAQ1394 2.0.1
- NI Vision 7.1
In VB, I can Snap/Grab Image from 1394 camera and display the Image in CWIMAQVIEWER :
Dim Image0 As New CWIMAQImage
imaq1394SnapCW(sid0,Image0)
CWIMAQViewer1.Attach Image0
Now,How can I do this in VC++6.0?
I tried:
C_CWIMAQImage m_imgViewer1;
m_imgViewer1 = m_CWIMAQVision1.CreateCWIMAQImage();
m_CWIMAQViewer1.Attach(m_imgViewer1);
imaq1394SnapCW(Sid,m_imgViewer1); <--there is no "imaq1394SnapCW "function in VC++,why?
Please help me!
Thank you!For people looking back at these old posts regarding
CWIMAQViewer - it was not made to be used in the C environments and is made
for VB.
Refer to the following locations for displaying images in C
environments:
Start»All Programs»National Instruments»Vision»Documentation
Start»All
Programs»National Instruments»Vision»Text Based Examples
Make
sure that you look at the examples and documentation that is in
reference to the C environments not the VB environments
Vince M
Applications Engineer -
Image instead of List Name, and hyperlink the image to view 'All Items.aspx' page
Hi,
I would like remove the Page title for list (i.e., name of the list in view all items.aspx page) , and instead use image and hyperlink the image
to 'All items.aspx" page.
Using developer tool found the element (#PageTitle) and added 'Script Editor' webpart and below css script to it. I am successful in replace the
title to image, however, I am unable to add the HTML tag for hyperlink. Where do I need to add or how do I add? Could anyone help me please??
<style type="text/css">
#pageTitle
background-image: url('http://w2k81368:2116/SiteAssets/Test.jpg');
background-repeat:no-repeat;
text-indent: 100%;
white-space: nowrap;
</style>
Regards,
SunithaHi Sunitha,
According to your description, my understanding is that you want to change the list title to an image.
I recommend to add the code below to the list page:
<script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script><script type="text/javascript">
$(document).ready(function (){
var s = "<img alt='SP' src='http://w2k81368:2116/SiteAssets/Test.jpg'>";
var $t = $("#DeltaPlaceHolderPageTitleInTitleArea span span a");
$t.html(s);
</script>
After that, the list title will change to the image and it will show allitems.aspx page when clicking the image.
Thanks,
Victoria
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected]
Victoria Xia
TechNet Community Support -
How to read list item and display Title and on click hyperlink as value by javascript /jquery
on newform.aspx just above the top of cancel button I want to put 1 hyperlink "Help"
but I want to do this by script/jquery by reading my configuration list where 1 column is TITLE and other is- URL
in TITLE column will write "Help" and in URL column I will write
http://portal1234/sites/sudha/MyHelppage.aspx
so script should read Title and display Help--->1st part
Script should read Value column and on click of help-(display link) the respective url should be open in new window.-->second part
Please let me know reference code for adding anchor tag dynamically by reading from list
I can see hyperlink near cancel button-
$(document).ready(function(){
var HelpLinkhtml ='<a href="#" text="Help">Help</a>';
var position =$("input[value='Cancel']").parent("td").addClass('ms-separator').append(HelpLinkhtml);
now for reading from list I am trying below script-
$(document).ready(function() {
GetHelpLinkFromConfigList();
function GetHelpLinkFromConfigList()
//The Web Service method we are calling, to read list items we use 'GetListItems'
var method = "GetListItems";
//The display name of the list we are reading data from
var list = "configurationList";
//We need to identify the fields we want to return. In this instance, we want the Title,Value fields
//from the Configuration List. You can see here that we are using the internal field names.
var fieldsToRead = "<ViewFields>"+"<FieldRef Name='Title' />"+"<FieldRef Name='Value' />"+"</ViewFields>";
//comment
var query = "<Query>" +
"<Where>" +
"<Neq>" +
"<FieldRef Name='Title'/><Value Type='Text'>Help</Value>"
+
"</Neq>" +
"</Where>" +
"<OrderBy>" +
"<FieldRef Name='Title'/>" +
"</OrderBy>" +
"</Query>";
$().SPServices(
operation: method,
async: false,
listName: list,
CAMLViewFields: fieldsToRead,
CAMLQuery: query,
completefunc: function (xData, Status) {
$(xData.responseXML).SPFilterNode("z:row").each(function() {
var displayname = ($(this).attr("ows_Title"));
var UrlValue = ($(this).attr("ows_Value")).split(",")[0];
AddRowToSharepointTable(displayname,UrlValue)
function AddRowToSharepointTable(displayname,UrlValue)
$("#NDRTable").append("<tr align='Middle'>" +
"<td><a href='" +UrlValue+ "'>+displayname+</a></td>"
+
"</tr>");
<table id="NDRTable"></table>
Thanks :)
sudhanshu sharma Do good and cast it into river :)Hi,
From your description, you want to add a help link(read data from other list) into new form page.
The following code for your reference:
<script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script type="text/javascript">
ExecuteOrDelayUntilScriptLoaded(AddHelpLink, "sp.js");
function AddHelpLink() {
var context = new SP.ClientContext.get_current();
var list= context.get_web().get_lists().getByTitle("configurationList");
var camlQuery= new SP.CamlQuery();
camlQuery.set_viewXml("<View><Query><Where><Eq><FieldRef Name='Title'/><Value Type='Text'>Help</Value></Eq></Where></Query></View>");
this.listItems = list.getItems(camlQuery);
context.load(this.listItems,'Include(Title,URL)');
context.executeQueryAsync(function(){
var ListEnumerator = listItems.getEnumerator();
while(ListEnumerator.moveNext())
var currentItem = ListEnumerator.get_current();
var title=currentItem.get_item("Title");
var url=currentItem.get_item("URL").get_url();
var HelpLinkhtml ='<a href="'+url+'">'+title+'</a>';
$("input[value='Cancel']").parent("td").addClass('ms-separator').append(HelpLinkhtml);
},function(sender,args){
alert(args.get_message());
</script>
Result:
Best Regards
Dennis Guo
TechNet Community Support -
Query list items and display in client webpart..
I am using the code below to display list items in clientwebpart but getting errors.Below is the code written in js file..What is wrong with the code??
Error:javaScript runtime error: Unable to set property 'innerText' of undefined or null reference
'use strict';
var context = SP.ClientContext.get_current();
var user = context.get_web().get_currentUser();
var web;
var spHostUrl;
var parentcontext;
spHostUrl = decodeURIComponent(getQueryStringParameter('SPHostUrl'));
parentcontext = new SP.AppContextSite(context, spHostUrl);
web = parentcontext.get_web();
var list = web.get_lists().getByTitle("ListsTask");
var camlQuery = new SP.CamlQuery();
camlQuery.set_viewXml("");
this.listItems = list.getItems(camlQuery);
context.load(listItems);
context.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded),
Function.createDelegate(this, this.onQueryFailed));
// This code runs when the DOM is ready and creates a context object which is needed to use the SharePoint object model
$(document).ready(function () {
getUserName();
// This function prepares, loads, and then executes a SharePoint query to get the current users information
function getUserName() {
context.load(user);
context.executeQueryAsync(onGetUserNameSuccess, onGetUserNameFail);
// This function is executed if the above call is successful
// It replaces the contents of the 'message' element with the user name
function onGetUserNameSuccess() {
$('#message').text('Hello ' + user.get_title());
// This function is executed if the above call fails
function onGetUserNameFail(sender, args) {
alert('Failed to get user name. Error:' + args.get_message());
function getQueryStringParameter(urlParameterKey) {
var params = document.URL.split('?')[1].split('&');
var strParams = '';
for (var i = 0; i < params.length; i = i + 1) {
var singleParam = params[i].split('=');
if (singleParam[0] == urlParameterKey)
return decodeURIComponent(singleParam[1]);
function onQuerySucceeded() {
$("#results").empty();
var listInfo = '';
var listEnumerator = listItems.getEnumerator();
listInfo += "<table><tr><th>Id</th><th>Title</th></tr>";
while (listEnumerator.moveNext()) {
var listItem = listEnumerator.get_current();
listInfo += '<tr><td>' + listItem.get_item('ID') + '</td>'
+ '<td>' + listItem.get_item('Title') + '</td>'
+ '</tr>\n';
listInfo += '</table>';
$("#results").html(listInfo);
function onQueryFailed(sender, args) {
$("#results").empty();
$("#results").text('Request failed. ' + args.get_message() +
'\n' + args.get_stackTrace());HI,
I have modified your code.
'use strict';
var context = SP.ClientContext.get_current();
var user = context.get_web().get_currentUser();
var web;
var spHostUrl;
var parentcontext;
spHostUrl = decodeURIComponent(getQueryStringParameter('SPHostUrl'));
parentcontext = new SP.AppContextSite(context, spHostUrl);
web = parentcontext.get_web();
// This code runs when the DOM is ready and creates a context object which is needed to use the SharePoint object model
$(document).ready(function () {
getUserName();
getitems();
// This function prepares, loads, and then executes a SharePoint query to get the current users information
function getUserName() {
context.load(user);
context.executeQueryAsync(onGetUserNameSuccess, onGetUserNameFail);
function getitems()
var list = web.get_lists().getByTitle("ListsTask");
var camlQuery = new SP.CamlQuery();
camlQuery.set_viewXml("");
this.listItems = list.getItems(camlQuery);
context.load(listItems);
context.executeQueryAsync(onQuerySucceeded1, onQueryFailed1);
// This function is executed if the above call is successful
// It replaces the contents of the 'message' element with the user name
function onGetUserNameSuccess() {
$('#message').text('Hello ' + user.get_title());
// This function is executed if the above call fails
function onGetUserNameFail(sender, args) {
alert('Failed to get user name. Error:' + args.get_message());
function getQueryStringParameter(urlParameterKey) {
var params = document.URL.split('?')[1].split('&');
var strParams = '';
for (var i = 0; i < params.length; i = i + 1) {
var singleParam = params[i].split('=');
if (singleParam[0] == urlParameterKey)
return decodeURIComponent(singleParam[1]);
function onQuerySucceeded1() {
$("#results").empty();
var listInfo = '';
var listEnumerator = listItems.getEnumerator();
listInfo += "<table><tr><th>Id</th><th>Title</th></tr>";
while (listEnumerator.moveNext()) {
var listItem = listEnumerator.get_current();
listInfo += '<tr><td>' + listItem.get_item('ID') + '</td>'
+ '<td>' + listItem.get_item('Title') + '</td>'
+ '</tr>\n';
listInfo += '</table>';
$("#results").html(listInfo);
function onQueryFailed1(sender, args) {
$("#results").empty();
$("#results").text('Request failed. ' + args.get_message() +
'\n' + args.get_stackTrace());
But still not able to get list items, i m finding soultion.
Thanks
varinder -
Read sharepoint list items and display it inside a div in aspx page
So I have this sample aspx page with this design:
<div class="column1">Events</div>
<div class="column2">Details</div>
<div class="column3">Contact</div>
Now, I want to dynamically change the words (Events, Details, COntacts) depending on the content of my "Columns" sp list.
how can I do this?
----------------------- Sharepoint NewbiePlace the label controls in the div tags like
<div class="column1">Eventslabel</div>
<div class="column2">Detailslabel</div>
<div class="column3">Contactlabel</div>
public void ReadList() {
// Use using to make sure resources are released properly
using(SPSite oSite = new SPSite(pathToSite)) {
using(SPWeb oWeb = oSite.AllWebs[nameOfWeb]) {
// Alternately you can use oSite.RootWeb if you want to access the main site
SPList oList = oWeb.Lists[listName]; // The display name, ie. "Calendar"
foreach(SPListItem oItem in oList.Items) {
// Access each item in the list...
//Bind the values to label
// etc.... -
Browser can resolve, access, and display JPEG image, but ImageIcon can't.
I've got this weird problem that only happens with images accessed through a customer's VPN:
Microsloth Internet Imploder can resolve, access, and display a JPG image from a VPN URL, in the general form:
http://intranet/part?FOOBAR.JPG which the browser apparently transmogrifies into
http://mogrify.foo.com/images/scripts/cgi/detail.cgi?FOOBAR.JPG(as Jack Webb often said, the names have been changed to protect the innocent)
Firefox can also resove, access, and display the image.
But an ImageIcon, when fed either URL, quietly fails to get anything, No errors, no exceptions, but no image, either.
The application, if it detects the failure of ImageIcon to come up with the image, somehow (not my code) defers to "Windoze Image and Fax Viewer," which locks up trying to resolve, access, and display the image.
What could possibly be going on here?I'd love to have the luxury of saying, "You lost me at Windoze." Then again, to paraphrase a running gag from Airplane!, it looks like I picked the wrong week to quit hemlock.
As my final message on my other thread on this topic indicates, the problem is that even though the URL ends in JPG, the server isn't really serving up a JPEG, but rather, an HTML page containing the JPEG.
Knowing this, a solution (of sorts) presented itself: if the URL doesn't produce a displayable ImageIcon, try constructing a JEditorPane on the URL. The results aren't exactly pretty, and you do have to try the ImageIcon first, but it does work.
JHHL -
Any other way to display the images in jsp
Dear All,
I had a program in get the image in database and display the image in jsp file.
Generally we are using
setContenttype(image) and write the binary values in jsp file,
is there any other way to store the jpeg file in speciefied folder and view the jsp fileIs there any other way to play the shuffle in a car if it doesn't have an aux facility???
There is not.
Or I wondered if you could play it through a smart tv...or do you need an apple tv box???
Not with the Apple TV, but if the Smart TV has an AUX port, you can connect it that way.
B-rock -
Create Custom List, store information and display the information on web part
Hi,
Working on a Custom visual web part in sharepoint 2010. Scenario is i would like to have two button on that web part, one is "I read it " button for users to tag the page and another one is "find the list of people who already tag/read that
page". i have added a visual web part into my project and two buttons event within it. Now goal is once user click on "I read it button" it will create custom list to store urls and usersname. When click on "Find the list of people"
get the username only for that specific page whoever read/tag it.
1. How can i create the custom list to store all users information
2. Retrieve the information from Custom List and Display the list of people based on specific page url who ever read/tag that page.
Any help will be greatly appreciated!Appreciated for your help!
List has four columns Title, Hyperlink, Created by, and created. i just wanted to display Users and hyperlink column. i tried to retrieve the items from list but query is not returning any items and displaying. As you said in CAML query we can pass the page
url to get the collection of user for that particular page. but is not something will be hard coded value, if we pass the page url into CAML query? is there something we can dynamically retrieve the users based on page url. for example, if users visits
30 different page url, i need to put all those urls into CAML Query. do i need to create custom user field or i can use Created by field to get the users? please correct me if i am wrong. Below is the code:
using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;
using System.Data;
namespace CustomUserControl.VisualWebPart1
public partial class VisualWebPart1UserControl : UserControl
protected void Page_Load(object sender, EventArgs e)
protected void btnRead_Click(object sender, EventArgs e)
using (SPSite site = new SPSite(SPContext.Current.Web.Site.ID))
using (SPWeb web = site.OpenWeb())
web.AllowUnsafeUpdates = true;
SPList list = web.Lists["UserInformation"];
SPListItem newItem = list.Items.Add();
SPFieldUrlValue hyper = new SPFieldUrlValue();
//hyper.Description = "Google";
hyper.Url = System.Web.HttpContext.Current.Request.Url.AbsoluteUri.ToString();
newItem["Hyperlink"] = hyper;
newItem.Update();
web.AllowUnsafeUpdates = false;
protected void btnDisplay_Click(object sender, EventArgs e)
SPWeb web = SPContext.Current.Web;
SPList list = web.Lists["UserInformation"];
SPQuery query = new SPQuery ();
query.Query = "<Where><Eq><FieldRef Name='Hyperlink' Type='URL' /><Value>http://nyc01d1sptmp01:8080/diligent/wiki/cft/Pages/home.aspx</Value></Eq></Where>";
DataGrid grdList = new DataGrid();
SPListItemCollection items = list.GetItems(query);
DataTable table;
table = new DataTable();
table.Columns.Add("Title", typeof(string));
table.Columns.Add("Hyperlink", typeof(string));
table.Columns.Add("Created by", typeof(string));
DataRow row;
foreach (SPListItem result in items)
row = table.Rows.Add();
row["Title"] = result.Title;
row["Hyperlink"] = result.Name;
SPFieldUser userField = (SPFieldUser)result.Fields.GetField("Users");
SPFieldUserValue userFieldValue = (SPFieldUserValue)userField.GetFieldValue(result["Users"].ToString());
SPUser user = userFieldValue.User;
string name = user.LoginName;
row["Created by"] = name;
grdList.DataSource = table.DefaultView;
grdList.DataBind(); -
Hello,
Is it possible to submit a list item and at same time query/search the results if parameters are matched.
Example - user logon to site enter search parameters and hit submit button. Once done parameters gets saved in list and shows search results on page. I have been asked to do this with
SP designer and InfoPath doesn’t work due items limits.
Please suggest.
Thanks,
Manish
ManishHi Manish,
may i ask if you need,
when user account click the login button, it will be authenticate the user and then it will show search result page?
may i know how the keyword of words to be put? is it together with the user account box, password and keyword?
or it will be like, after user authenticate, it will redirect to search page, so that user may use the search page to input the keyword?
Regards,
Aries
Microsoft Online Community Support
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. -
Trying to clean up my iMac. Noticed that while in finder, I click on Applications and in the list I see another folder called applications that is a duplicator of the original folder. Is this truly a copy that can be deleted?
DO NOT remove either folder. DO NOT mess with any OS X system files either. If you have dupliocates check your files in iPhoto, iTunes and your iMovies libraries. Also check your data files, under ALL circumstances stay away from any OS X systems files or you will probably bork your Mac to the point it will not run.
-
I've just bought a Macbook Pro 15" and I'm trying to use Photoshop, but the resolution its displaying the images at for 100% are too small. I have to design for the web, so need to be intricate with detail, but I'm finding it adjusts the resolution of the image right down. (I mean you can see the image clearly, but it's too small to edit). When I look at Safari and see a web page at 100% it's clear, but the same page displayed in Photoshop CC appears 50% of the size (even though it says it's 100%) If I move the application window to another screen it adjusts it correctly – leaving all the pallettes, menus and tools correctly sized as they are on the retina display Is there some way to adjust the way Photoshop CC displays images so it is more consistent with what you actually see? There doesn't seem to be any answer on the Adobe forum, so hopefully someone here can shed some light. MacBook Pro with Retina display, 15", OS X Yosemite (10.10.2), Photoshop CC 2014
I tested both ways. With "open in low resolution" ckecked the size of the images is cool, but it is low-resolution including Photoshop appearance.
If "open in low resolution" is unckecked the appearance is good but the very small size.
See the image below. It has 650 x 732 px, 72 dpi. The font of the text "Neste aniversário ..." is with 18pt. -
How to compare two images and display the difference on Front Panel
HI..
I have attached two images.
I want to compare these two images and subtract the differenc from these two images and display the difference(the mouse) on the front panel
Anyone can help me?
Really thanks
Attachments:
IMG_2117.JPG 1677 KB
IMG_2118.JPG 1650 KBThe missing thing. You have to keep in mind that what you see is not the same as the camera sees.
So when using IMAQ Substract it gives you the difference of the value of every single pixel!
In order to find the mouse as only difference you have to manage that every other pixel value stays the same, e.g. with a proper lightening.
At the other hand you can combine different filters or alogorithms to get the object, e.g. if the object is darker or brighter then everything else in the image you could use a threshold and then use morphologic operations to get the objects size and position.
Christian
Maybe you are looking for
-
InDesign to Dreamweaver for web
What is the best format and method for exporting from InDesign to Dreamweaver? I create a number of e-flyers where I set up the html file in Dreamweaver, view it in the browser and then send by email, embedding the content in the email as an e-flyer.
-
How can I save pictures sent by e-mail to my i photo library?
How do I save photos sent by e-mail to my iphoto library?
-
I have read about battery care and calibration of the battery. What I want to know is when you battery is at 100% do you unplug when using it at home when an outlet is near by or just leave it plugged. I usually use mine watching the tv so the oulet
-
Please helpppp me in this problem
Hi every one I try to use the top-n analysis in formula coulmn in report but it give me error for example select ename from(select rownum,ename from emp order by sal) where rownum<=3; this in function this error if I omit order by no error but I need
-
A few days ago I was browsing some listings on eBay when all of a sudden my Downloads opens up, and I have downloaded a .HTML with a long string of numbers as its name. I promptly delted it, didn't even open it. Searching its name on Google didn't tu