RE: [DQSD-Users] searches array

2005-01-05 Thread Shawn K. Hall
Hi Ryan,
 
 Yeah, that was the first thing I tried.  I put the
 line alert(searches.length); into one of my search
 files and did a search.  It popped up saying
 Undefined.  alert(searches) just gives [Object
 object].  The aliases array does the same thing.

This is the structure of each searches[] element, which is a named
array:
 {fname, name, desc, link, cat, subcats, fun, 
  aliases[], enabled, aliasmenudisplay, local, nomenu}

Enumerate using this style (based on qsfind):
  var s = ;
  for (var i in searches){
if (isNaN(i)){
  if (searches[i].fname.substr(0,1) != _)
s +=   + searches[i].fname;
}
  }
  alert ( s );

Regards,

Shawn K. Hall
http://12PointDesign.com/
http://ReliableAnswers.com/

'// 
   In theory, there is no difference between theory and 
practice; In practice, there is.
-- Chuck Reid




---
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almosthttp://www.thinkgeek.com/sfshirt
___
To unsubscribe visit:
https://lists.sourceforge.net/lists/listinfo/dqsd-users
DQSD-Users@lists.sourceforge.net
http://sourceforge.net/mailarchive/forum.php?forum_id=8601


[DQSD-Users] searches array

2005-01-04 Thread ryan_carpenter

Yeah, that was the first thing I tried. I put the line alert(searches.length); into one of my search files and did a search. It popped up saying "Undefined". alert(searches) just gives "[Object object]". The aliases array does the same thing.

Does anyone know what I'm doing wrong?
-Ryan
-- Original message --  Hi Ryan,Everyone- is there an easy way to access an array of   all the search names from within a search script?   You can enumerate them using the searches[] and aliases[] arrays.  Look in loader.js for code that works with them, that should give  you a start anyway.   Regards,   Shawn K. Hall  http://12PointDesign.com/  http://ReliableAnswers.com/   '//   A lot has been said about politics;  some of it complimentary, but most of it accurate.  -- Eric Idle  ---  The SF.Net email is sponsored by: Beat the post-holiday bl
 ues  Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.  It's fun and FREE -- well, almosthttp://www.thinkgeek.com/sfshirt  ___  To unsubscribe visit:  https://lists.sourceforge.net/lists/listinfo/dqsd-users  DQSD-Users@lists.sourceforge.net  http://sourceforge.net/mailarchive/forum.php?forum_id=8601