WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 Article/use question : GRID, Michel Hanna, March 10, 2004
     Re:Article/use question : GRID, Jeffrey Jangli, March 11, 2004

Subject: Re:Article/use question : GRID From: Jeffrey Jangli Date: March 11, 2004

This notation is just a nice way for shortening your code.
I think it's called the trinary operator

It could have also been written as:

var r;
if (p0.length) r=p0.length;
else r=p0;

(note the 0 is a zero not the alphabetical letter o)


From: Michel Hanna
Sent: March 11, 2004
Subject: Re:Article/use question : GRID

Question about the following part of the code used in the "Grid" widget.

function WebFXGrid(p0, p1, bUnescapeData) {
r = (p0.length)?p0.length:p0;
c = (p0.length && p0[0].length)?p0[0].length:p1;
.id = webFXGridHandler.getId();
webFXGridHandler.all[this.id] = this;

The Red part of the code does what? I tried to test it, but am not able to get anything besides and error back. 

Seeing that the demo.asp page for this script is sending in 4 actual variables to the function... How is that working properly? And why would I be getting an error of "0.Length is Null or not an object"


Thanks Erik, or whomever response to this question!


Enter your reply to this message below. HTML tags are not supported but words that start with http://, ftp:// or mailto: are converted to links.

View All Messages
Back to WebFX