473,394 Members | 1,879 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

TreeView1_ImageArray images positions are not fix

Hi. I am trying to dynamically change the nodes pictures in javascript in my
treeview and with patience I visited all the urls in my ImageArray to see
what picture was. Then I used the same url to get to that picture but it was
a different picture!! I know those pictures are created dynamically by
asp.net but I thought the positions in the array were always the same
because the TreeView_ToggleNode(...) function uses fixed positions in its
code (see below). Am I doing something wrong?? Thanks. alex.

function TreeView_ToggleNode(data, index, node, lineType, children) {
var img = node.childNodes[0];
var newExpandState = "e";
if (children.style.display == "none") {
children.style.display = "block";
if (img != null) {
if (lineType == "l") {
img.src = data.images[15];
}
else if (lineType == "t") {
img.src = data.images[12];
}
else if (lineType == "-") {
img.src = data.images[18];
}
else {
img.src = data.images[5];
}
img.alt = data.collapseToolTip.replace(/\{0\}/,
TreeView_GetNodeText(node));
}
}
else {
newExpandState = "c";
children.style.display = "none";
if (img != null) {
if (lineType == "l") {
img.src = data.images[14];
}
else if (lineType == "t") {
img.src = data.images[11];
}
else if (lineType == "-") {
img.src = data.images[17];
}
else {
img.src = data.images[4];
}
img.alt = data.expandToolTip.replace(/\{0\}/,
TreeView_GetNodeText(node));
}
}
data.expandState.value = data.expandState.value.substring(0, index) +
newExpandState + data.expandState.value.slice(index + 1);
}
Jun 20 '06 #1
0 1256

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

Similar topics

5
by: Jason | last post by:
Hi, I wish to create a little game where you drag pieces onto a board. I have been playing around with a picture box: Private Sub Picture1_DblClick() Picture1.Left = Picture1.Left + 50 End...
4
by: Paul LeBlanc | last post by:
I have some images that move positions fine using onmousedown or onmousemove to feed a function the coordinates. It doesn't work when I plug it into conditional loops with setTimeout to set the...
3
by: news | last post by:
I'm working with a CGI program that was using several standard buttons for input using <input type="submit" name="abuttonName" ... Now, I'm trying to replace the standard buttons with images...
17
by: Barry Pearson | last post by:
I'm not asking a question. I'm simply showing a technique that may be useful to some people in future. I wanted a way of using photographs for rollover effects without having to slice the...
3
by: Mark Carroll | last post by:
I've been wanting web pages that nicely embed images among text. The way I typically do this at the moment is to sprinkle my IMGs through the text as floats, alternating between float: left and...
2
by: hq105862 | last post by:
Hi, Is it possible to simulate frames behaviour with CSS? Currently, I've used CSS to create the visual look of my old framed site. For this I've used styles that place the images at absolute...
8
by: Dr John Stockton | last post by:
I have, in a div, four square images of different known sizes, displaying side-by-side. Three have transparent backgrounds. I wish to stack the images so that the centres coincide. Can someone...
0
by: KK | last post by:
Dear All I have an MDI Application which needs to restore it's previously closed state on subsequent openings. While closing the application, I am storing the positions of all the Mdi child...
1
by: nakoned | last post by:
Hi, I am sure I have very basic question, but I just spent two hours trying to fix it... so here is goes. I am trying to create vertical CSS tabs/menu, but cannot change the spacing between...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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,...
0
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...
0
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...

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.