This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

update_element_function problem: position parameter does not work

Forum to discuss ExtJS and other JS plugins

update_element_function problem: position parameter does not work

by cutups » Thu Aug 13, 2009 11:36 am

I'm working in symfony 1.2

I'm finding that the update_element_function does not use the position parameter properly. Has anybody else fun into this issue and found a solution.

I'm trying to insert some html at the top of the inside of a div.

So I run this query:

<?php
echo javascript_tag(
update_element_function('container', array (
'position' => 'top',
'content' => '<div id="new-div">content</div>',
'script' => 'true',
))
);
?>

The new content does not appear at the top of the inside of the container, but instead appears at the bottom.

Using firebug, i see that it ends up as:

//<![CDATA[
$('container').insert('<div id=\"new-div\">content</div>','top');

//]]>

Which, looking at the prototype docs, doesn't match the specification for insert...
cutups
Member
 
Posts: 36
Joined: Tue May 08, 2007 9:39 am