sg

Perşembe, Ocak 19, 2006

Re: please debug -- icon colors


What I don't understand in these examples is how you load the values
from your data into your variables... in my usual world of vbscript,
you write a query, and then you load values via a loop -- so strcolor =
rs("color"), etc.

In javascript, I'm having a hard time figuring this out -- in my base
script, I've managed to create an array that has a code to control
color for each record -- if the code = 2, I want the icon to be yellow.

In your script, you're using iconstr to hold the color value -- but
where does iconstr come from -- what are you evaluating in this
function?

function get_icon(iconStr) {
if (iconStr == "red") {
return redIcon;
} else if (iconStr == "blue") {
return blueIcon;
} else if (iconStr == "green") {
return greenIcon;
} else if (iconStr == "yellow") {
return yellowIcon;
} else if (iconStr == "orange") {
return orangeIcon;
} else { // if don't understand iconStr return a red one.
return redIcon;
}

tia//

0 Comments:

Yorum Gönder

<< Home


Komik Videolar   islam  şarkı sözleri  yemek tarifleri  gelibolu  huzur   sağlık