When executing my code in IE7 I get the error: 'tagName' is null or
not an object, on line 2431 of prototype.js.

The action actually completes, all the divs are update, just in IE I
get that error,

Please keep in mind that I am still a prototype newby...

The code I use is below:

var Manage = Class.create({
        initialize: function() {
                var self = this;
                facebox.reveal('',null);
                $$('#facebox .content').first().update('<img 
src="common/stylesheets/
indicator_small.gif" class="activity" />');
                new Effect.Appear(facebox.facebox, {duration: .3});
                var tmpl = new Template('<h1>Activate another site</h1><table
id="activate_table" border="0" cellpadding="0"
cellspacing="0"><thead><tr><td>Id</td><td>Name</td><td>URL</
td><td>Href</td></tr></thead><tbody>#{body}</tbody></table>')

                new Ajax.Request('includes/ajax/manage.php?id=21', {
                        method:'get',
                        onSuccess: function(resp){
                                var response = resp.responseText.evalJSON(true);
                                $$('#facebox 
.content').first().update(tmpl.evaluate(response));

                                var sites = $$('#activate_table tbody 
.activate');

                                    sites.each(function(element) {
                                                element.observe('click', 
function(e) {
                                                                var id = 
element.readAttribute('site').gsub('#', '');
                                                                
element.addClassName('selected');
                                                                $$('#facebox 
.content').first().update('<img src="common/
stylesheets/indicator_small.gif" class="activity" />');
                                                                
self.activate(id);
                                                });
                                        });
                        },
                        onFailure: function(resp){
                                var response = resp.responseText;
                                $$('#facebox 
.content').first().update(response);
                        }
                });
        },

        activate: function(id) {

                var self = this;
                var tmpl1 = new Template('<h1>#{name} 
activated</h1><p>#{response}</
p>')

           new Ajax.Request('includes/ajax/manage.php?id=22', {
                        method:'post',
                        parameters: {
                                        site_id: id
                        },
                        onSuccess: function(resp){
                                var response = resp.responseText.evalJSON(true);
                                $$
('#facebox .content').first().update(tmpl1.evaluate(response));

                                //update the Cloud Box with the new site name
                                $('manage').update('<img 
src="common/stylesheets/
indicator_small.gif" class="activity" />');
                                var tmpl2 = new Template('<blockquote><p 
class="tiny">#{name}<br /
><a href="#includes/ajax/manage.php?id=21" id="mng">Manage another
site</a></p></blockquote><cite>Active Site</cite>');
                                $('manage').update(tmpl2.evaluate(response));

                                $('mng').observe('click', function(e) {
                                        Event.stop(e);
                                        self.initialize();
                                });
                },
                        onFailure: function(resp){
                                var response = resp.responseText;
                                $$('#facebox 
.content').first().update(response);
                        }
                });
        }
});
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to