<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml";>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1" />
<title>MySite</title>
</head>
<body>
<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"
alt="" /></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 type="javascript">
$( "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>
</body>
</html>


Checked and validated!
(There were some javascript sintax on the code i posted because i had
to change it to post here... )

EMoreth

On Oct 2, 9:07 pm, kangax <[EMAIL PROTECTED]> wrote:
> On Oct 2, 6: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 ?
>
> Is there a proper doctype?
> Does the page validate?
>
> If so, then this looks like a bug. Please file it and we'll take a
> look at it.
>
> Thanks.
>
>
>
> > EMoreth
>
> --
> kangax- 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