Wow
U are really fast guys !!! I'll definitely gonna to use this dumpObj function (I have already firebug). thanks a lot
I found my mistakes which was as usual quit dumb:
I made this: class="thickbox" class="tooltip"
instead of class="thickbox tooltip"

olivvv



On 11/9/06, Stephen Woodbridge <[EMAIL PROTECTED] > wrote:
Olivier Percebois-Garve wrote:
> Hi
>
> I'm trying to implement jtip on a page where I have already implemented
> the thickbox, both on <a> elements.
> Apparently the saveTitle function is not being called.
> Any thoughts ?
>
> In _javascript_ I really miss not to have a print_r() function to debug.
> Often I use alert() and innerHTML in order to see what I am manipulating,
> but here with objects, I don't know how to debug...

Here, just rename this function to print_r()


     // function to dump contents of an object

     var MAX_DUMP_DEPTH = 10;
     function dumpObj(obj, name, indent, depth) {
         if (depth > MAX_DUMP_DEPTH) {
             return indent + name + ": <Maximum Depth Reached>\n";
         }
         if (typeof(obj) == "object") {
             var child = null;
             var output = indent + name + "\n";
             indent += "\t";
             for (var item in obj)
             {
                   try {
                       child = obj[item];
                   } catch (e) {
                       child = "<Unable to Evaluate>";
                   }
                   if (typeof(child) == "object") {
                       output += dumpObj(child, item, indent, depth + 1);
                   } else {
                       output += indent + item + ": " + child + "\n";
                   }
             }
             return output;
         } else {
             return obj;
         }
     }

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to