codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  ?0:1; ?????? What this means?  KennyTE at 23:29 on Sunday, July 01, 2007
 

hello,

Can someone help me, i'm idiot in javascript.

Someone can expalain to me what the numbering in the end of line means.---> ?0:1;

abc_element = (!document.getElementById("abc") )?0:1;


Thanks in advance.

  Re: ?0:1; ?????? What this means?  mmarab at 15:54 on Monday, July 09, 2007
 

I reckon this is getting the result of the operation, and returning a 0 or a 1 dependent on the result returned. So !document.getElementById("abc") is maybe returning a value. 0 or 1 like booleans. True or False.

Like in c++:

? : Ternary conditional (if-then-else) int i = (a > b) ? a : b; right to left








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums
//








Recent Forum Threads
•  Re: horizontal scroll bar for drop down list box
•  Wheel Project
•  TO SEND Text message or URL through Clickatell
•  Re: JTable
•  Unix command output displayed 0 in browser
•  Perl 5.6 PPM is not working
•  Re: Need Code
•  telnet to a system with username and password using perl
•  Re: validating drop down


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2007