Ooops, I forgot to tell that I am using Prototype 1.6.0.3 and Scripty
1.8.2 :o)

Eric

On Aug 14, 4:35 pm, Eric <[email protected]> wrote:
> Hi,
>
> I have a table with some editable cells.
> The initial content of cells may be empty. I'd like the InPlaceEditor
> (IPE) to start editing when user clicks anywhere in the cell (which
> can be larger than the actual text content).
>
> I managed to achieve this in IE8 and FF2-3.5, but once again, IE6 adds
> some spice in my life...
>
> I made a minimal case on pastie:http://pastie.org/584025with the
> three approaches I tried so far.
>
> Here are the interesting parts:
>   <style> span.IPE {display: block;} </style>
>   <script type='text/javascript' language='javascript'>
>     document.observe("dom:loaded",function()
>     {
>       $('t').select('.IPE').each( function(div)
>       {
>         new Ajax.InPlaceEditor(div,'something.php', {});
>       });
>     });
>   </script>
>
>   <table id="t">
>     <thead>
>       <tr><th>X title</th><th>Y title</th><th>Z title</th></tr>
>     </thead>
>     <tbody>
>       <tr>
>         <td><div class="IPE">A</div></td>
>         <td><span class="IPE">B</div></td>
>         <td class="IPE">C</td>
>       </tr>
>     </tbody>
>    </table>
>
> So, what is happening:
> - First case, using a div container (*) : Works as expected on IE8 and
> FF but on IE6 you have to click on the actual text to activate InPlace
> editing.
> - Second case, using a span with "display: block": Work as expected on
> FF, but IE8 for some reason uses now a textarea instead of an input
> for edition (so does IE6 if you click on the actual text, but you
> still have to click on actual text)
> - Third case, using the TD as IPE's target: This is an interesting
> one...
> All browsers (including IE6!) react when the cell is clicked (no need
> to click on the actual text), however the reaction is "Make the TD and
> its content disappear"!
>
> Another interesting thing in IE6 is that if the IPE reacts only when
> mouse is on the actual text, the highlight effect is performed on the
> actual div/span/td, which fills the whole table's cell...
>
> I cannot think to something else to try...
> If someone has an idea about how to make this work, I'd be glad to
> read it!
>
> Eric
>
> Note: I use "XHTML 1.0 Transitional" doctype (see pastie link for the
> complete source)
> (*) I am aware it is bad to put divs in tables, but so far that's the
> best working option :o(
> Better alternatives are welcome ;o)
--~--~---------~--~----~------------~-------~--~----~
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