Sorry.. Last prototype distribution ....

EMoreth

On Oct 2, 7:37 pm, EMoreth <[EMAIL PROTECTED]> wrote:
> <div class="messageItem" id="someid">
>         <div class="messageTitle box_tittle">
>                 <span>Some Text</span>
>                 <input type="button" value="Remover" style="padding: 0px; 
> height:
> 22px;" class="button" name="" />
>                 <input type="button" value="Exibir" style="padding: 0px; 
> height:
> 22px;" class="button" name="" />
>         </div>
>         <div class="messageContent contentWhiteBox" style="height:160px;
> margin-bottom:3px;">
>                 <table cellpadding="0" cellspacing="0" border="0">
>                         <tbody>
>                                 <tr>
>                                         <td>
>                                                 <div 
> class="messagePhoto"><img src="image/path/image.jpg" /></
> div>
>                                         </td>
>                                         <td>
>                                                 <div class="messageBody">
>                                                         Some Text
>                                                 </div>
>                                         </td>
>                                 </tr>
>                                 <tr>
>                                         <td></td>
>                                         <td>
>                                                 <div class="messageButtons" 
> style="float:right;
> position:relative">
>                                                         <input 
> class="buttonAnswer" type="button" value="Responder"/>
>                                                 </div>
>                                         </td>
>                                 </tr>
>                         </tbody>
>                 </table>
>         </div>
> </div>
> <script>
> $( "someid", null).each(function(obj){
>                 if(!obj)
>                         return;
>                 obj.select('[class="buttonAnswer"]')[0].observe("click",
> answerMessage);
>                 obj.select('[value="Remover"]')[0].observe("click", 
> deleteMessage );
>                 obj.select('[value="Exibir"]')[0].observe("click", 
> toggleMessage );
>         });
>
> });
>
> var answerMessage = function(evt)
> {
>         evt.stop();
>
>         if (this.currentMessageObj)
>                 this.cancelMessage();
>
>         var target = evt.element();
>
>         this.currentMessageObj = target.up('.messageItem'); // >>> Target is
> the input element
>
>         this.currentMessageObj.update('More information'); // >>> Here
> this.currentMessageObj has no properties
>
>         this.currentMessageObj.show();
>
> },
>
> </script>
>
> This is what Visual Studio 9 says on the watch view when the error
> occurs:
> target.tagName                                  "INPUT"
> target.up().tagName                                     "DIV"
> target.up().up().tagName                                "TD"
> target.up().up().up().tagName                           "TR"
> target.up().up().up().up().tagName                      "TBODY"
> target.up().up().up().up().up().tagName                 "TABLE"
> target.up().up().up().up().up().up().tagName                    "DIV"
> target.up().up().up().up().up().up().up().tagName               "DIV"
> target.up().up().up().up().up().up().up().className             "messageItem"
>
> I am running Wndows XP SP2 on IE7
>
> Some information more ?
>
> EMoreth
>
> On Oct 1, 5:10 pm, kangax <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Oct 1, 2:16 pm, EMoreth <[EMAIL PROTECTED]> wrote:
>
> > > This is the third time that this happens with me...
>
> > > First o thought that was my mistake but now i really cant figure out
> > > why this is happening:
>
> > > fncHandler : function(evt)
> > > {
> > >         evt.stop();
> > >         var target = evt.element();
>
> > >         target.up('.messageItem').update('Sent Message');
>
> > > }
>
> > > target.up('.messageItem') -> undefined
>
> > > target.up().up().up().up().up().up().up().className -> 'messageItem'
>
> > > It cant find the element even with a correct dom tree.. is there  a
> > > step number limitation or something ??
>
> > There shouldn't be any limitations.
>
> > Could you show the document structure where this happens?
> > Also, browser, prototype version, etc. info would be helpful.
>
> > Thank you.
>
> > > Thanks in advance...
>
> > > EMoreth
>
> > --
> > kangax- Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to