Hi Glenn,
>> Also while trying to hook bookmarks into the menu I
>> realized that the performSearch should be changed to
>> check to see if it's a search otherwise do a shellexec
>> on it.
> I don't understand.
Here's the function:
function performsearch(fname, term)
{
// if the specified search does not exist (ie. no default search), set to
defaultsearch
if (!fname)
{
if (!defaultsearch || !searches[defaultsearch]) // bad defaultsearch
variable (e.g., old localprefs.js) -> use gg instead of failing
fname = "gg";
else
fname = defaultsearch;
}
term = term.replace(/^\s+/g, '').replace(/\s+$/g, '') // strip out
leading and trailing spaces
if (searches[fname])
searches[fname].fun(term);
else
{
try
{
eval(fname + "()");
}
catch(e)
{
alert('An error (' + e + '/' + e.description + ') occurred while
trying to run the search "'+fname+'()'+'"');
}
}
}
Now it tries to do an eval on fname + "()" and if that fails displays an
alert. Now my bookmarks addon passes in a URL for fname and it fails
because the URL + "()" does not map to a function. I also cannot specify a
function name with a parameter either.
Hope this is clearer,
Brent
-------------------------------------------------------
This sf.net emial is sponsored by: Influence the future
of Java(TM) technology. Join the Java Community
Process(SM) (JCP(SM)) program now.
http://ad.doubleclick.net/clk;4699841;7576298;k?http://www.sun.com/javavote
_______________________________________________
DQSD-Devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dqsd-devel