473,809 Members | 2,776 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DHTML / ASP.NET Guru... Help

I have a datagrid that displays a list of contacts on our intranet site
using the ActiveDirectory as it's main Data Source.

I want to be able to show an image of each employee using a popup layer but
am not sure how I match the Active Directory Data to the correct image stored
in an SQL database. I plan on using the users fullname or email address as an
identifier to match up the image with the correct user but really don't know
how to make sure the correct image is loaded into the layer when you mouse
over a certain employee...

I have created the DataGrid and the popup layer that all have individual
<div> id's but how do I load the image in from the database into the correct
layer...

I would really, really appritiate some help on this on!

Thanks
<<<<CODE>>>>

<asp:datagrid id="DataGrid1" runat="server" AutoGenerateCol umns="False"
ShowFooter="Tru e" OnPageIndexChan ged="DataGrid1_ Paged"
Width="70%" CellPadding="4" BorderWidth="1p x" BorderStyle="Ri dge"
BorderColor="Li ghtGray"
CssClass="txtAr ea" GridLines="Hori zontal"
HeaderStyle-HorizontalAlign ="Center" HeaderStyle-Font-Bold="True"
AlternatingItem Style-BackColor="Whit eSmoke" AllowPaging="Tr ue"
PagerStyle-Mode="NextPrev"
AllowSorting="T rue">
<AlternatingIte mStyle BackColor="Whit eSmoke"></AlternatingItem Style>
<ItemStyle HorizontalAlign ="Center"></ItemStyle>
<HeaderStyle Font-Bold="True" HorizontalAlign ="Center"></HeaderStyle>
<Columns>
<asp:TemplateCo lumn HeaderText="" ItemStyle-HorizontalAlign ="Center">
<ItemTemplate >
<img ID='I<%# DataBinder.Eval (Container, "ItemIndex" )%>'
src="../images/user.gif" style="cursor: hand"
onmouseover="ja vascript:showTo pic(<%# DataBinder.Eval (Container,
"ItemIndex")%>) ;" onmouseout="jav ascript:hideIma ge(<%#
DataBinder.Eval (Container, "ItemIndex")%>) ;">
<DIV id='D<%# DataBinder.Eval (Container, "ItemIndex" )%>' style="Z-INDEX: 1;
LEFT: 300px; POSITION: absolute; TOP: 100px; HEIGHT: 130px; WIDTH: 100px;
BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT:
black 1px solid; BORDER-BOTTOM: black 1px solid; BACKGROUND-COLOR: white;
display: none;">
<asp:Image Runat="server" ID="userImage"
ImageUrl="../images/NoImage.gif"></asp:Image></DIV>
</ItemTemplate>
</asp:TemplateCol umn>
<asp:BoundColum n HeaderText="Nam e" DataFormatStrin g="{0}"
DataField="Name "></asp:BoundColumn >
<asp:BoundColum n HeaderText="Dep t." DataFormatStrin g="{0}"
DataField="Dept ."></asp:BoundColumn >
<asp:BoundColum n HeaderText="Ext ." DataFormatStrin g="{0}"
DataField="Ext" ></asp:BoundColumn >
<asp:HyperLinkC olumn HeaderText="Ema il" Text="<img
src='../images/envelope.gif' border='0'>" DataNavigateUrl Field="Email"
DataNavigateUrl FormatString="m ailto:{0}"></asp:HyperLinkCo lumn>
</Columns>
</asp:datagrid>

<<<JavaScript>> >
var lastSelectedNum = -1;
function showTopic(num)
{
if (lastSelectedNu m >= 0)
{
// reset the last selected item
var lastimage = document.getEle mentById('d' + lastSelectedNum );
lastimage.style .display = 'none';
}

var image = document.getEle mentById('d' + num);
image.style.dis play = 'inline';

lastSelectedNum = num;
}

function hideImage(num)
{
// hide image layer
var image = document.getEle mentById('d' + num);
image.style.dis play = 'none';
}
Nov 19 '05 #1
0 1105

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
4696
by: Chris | last post by:
Can anyone help me on this one? I have a giant (couple thousand rows) HTML table. Im trying to modify some of the cells innerHTML and/or innerText, but it is taking a VERY long time to do so. I believe that the problem is not with executing the code, but rather with the browser reparsing the page, or the table, or something.
4
2937
by: Accolo1 | last post by:
Help we are looking for this person, do you know them? William wjohnson@accolo.com Title: BEA WebLogic Portal Guru Job #: 03-04468 Check the pulse of your career! Evolve our eCommerce web portal centra nervous system with your advanced knowledge of BEA WebLogic portal an application servers, and J2EE. Using advanced open architectur
2
2002
by: mr_burns | last post by:
hi there, i would like a book that will explain concepts of javascript and dhtml instead of, for example, ten tutorials on how to do specific things in js or dhtml. ideally a book thats can explain from the basics of javascript, to more complex things such as dhtml and dom onto things like creating javascript objects (if that is possible, but u get the idea). rather than this is how you make a drop down menu tutorial; this is how you
5
5298
by: gimme_this_gimme_that | last post by:
I'd like to create my own version of google suggest GS. If you haven't seen GS check it out at : http://www.google.com/webhp?complete=1&hl=en I've reviewed several AJAX write-ups on the internet and understand the issues around passing and fetching data from the client to the server. Well, at least as it's described in various tutorials.
1
1325
by: sdonohue | last post by:
I am not very good at DHTML, but I have a set of links that use DHTML and they work :) But now the customer wants to have one of my DHTML links call a javascript function when it is clicked on. When I put it into DHTML, it treats everything between the " " like a constant. When I remove the quotes, it gives me an error. One of the versions I have tried is: DQM_rollover_image12 = "/images/nav_hospital.gif" DQM_rollover_wh12 =...
16
5908
by: Singulus | last post by:
Hello all, I've searched for similar threads, I've found some bit of useful info here and there, but nevertheless I want to post my questions...So, how can I (we, in fact the forum can benefit from the discussion, this is the point here) become C++ gurus? I have 5 years of working experience with C/C++, I know that this can be very ambiguous thing, but anyway...I've come to the point where I want to structure and organize my further...
9
5323
by: ninhovid | last post by:
Hi... i'm new at dhtml, and i want to use it in help windows (instead of window.open() of javascript)... i'm done it... but it works only in internet explorer.. in firefox 2 and 3 it opens the dhtml modal window but in the background of my main page... what do i have to correct so it opens up in front as it does in internet explorer? i'm using c# and ajax... it's an asp.net app... in masterpage i have this: <link rel="stylesheet"...
0
9721
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9603
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10640
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10376
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10387
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10120
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9200
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7662
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
3
3015
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.