From:  Martijn <martijn.martijn@gmail.com>
Date:  11 May 2009 17:24:32 Hong Kong Time
Newsgroup:  news.mozilla.org/mozilla.dev.web-development
Subject:  

Re: FireFox Bug?

NNTP-Posting-Host:  63.245.208.166

Hi Jeffry,

So you want the "'dbLst[u].split is not a function'" error solved?
You could wrap the "hold[u] = dbLst[u].split(',');" line around a
try..catch and then see what dbLst[u] is.

So something like this:
try {hold[u] = dbLst[u].split(',');} catch(e) { alert(dbLst[u]); }
Apparently, it is not a string, but you then know what it is and then
you perhaps can find out why it is not a string.

Regards,
Martijn

On Mon, May 11, 2009 at 4:21 AM, jeffry killen  wrote:
> Hello:
> I am developing an application in php on the server side and
> javascript on the client side.
>
> I hope e-mail programs do not screw this message up
> with limited line length wrapping.
>
> What I want to do is remove commas that occur as the first
> char in each array item string.
>
> Here is the context of a persistent error for which I cannot see
> any syntax errors:
>
> The following code is placed within 
tags > > > What is weird is that the same code appears in the same file in the script > tags between the > title tags and body tags: > function parseSHDB() >                  { >                   // php code supplies the values. a list of databases from > a database >                   // query, as a string. html markup is embedded from a > template, so >                   // I can depend on the strings used in replace and search > to be >                   // literally constant >                   var dbs = ""; >                   var pat = dbs.search(/show databases/i); >                   var dbsTabLst = new Array(); >                   var dbsRowLst = new Array(); >                   var dbsCelLst = new Array() >                   var outLst = new Array(); >                   if(pat != -1) >                     { >                      dbs = dbs.replace(/<\/table>/ig, ''); >                      dbs = dbs.replace(/<\/tr>/ig, ''); >                      dbs = dbs.replace(/<\/td>/ig, ''); >                      var fntStr = new RegExp(" face='sans-serif'>", "ig"); >                      dbs = dbs.replace(fntStr, ''); >                      dbs = dbs.replace(/<\/font>/ig, ''); >                     // <<<---- THIS DOES NOT PRODUCE ANY ERRORS: >                      dbsTabLst = dbs.split(" cellspacing='0' border='1'>"); >                     // <<<---- NOR THIS: >                      dbsRowLst = dbsTabLst[1].split(""); >                     for(var itr = 0; itr < dbsRowLst.length; itr++) >                         { >                          dbsCelLst[itr] = new Array(); >                          dbsCelLst[itr] = dbsRowLst[itr].split("
valign='top'>"); >                          outLst[itr] = dbsCelLst[itr]; >                          } >                     } >                   return outLst; >                  } > Does anyone have the patience and knowledge to give me a clue about this/ > Thank you in advance > JK > > > _______________________________________________ > dev-web-development mailing list > dev-web-development@lists.mozilla.org > https://lists.mozilla.org/listinfo/dev-web-development > -- Martijn Wargers - Help Mozilla! http://quality.mozilla.org/ http://wiki.mozilla.org/Mozilla_QA_Community irc://irc.mozilla.org/qa - /nick mw22