Forum: Ruby on Rails Ajax scaffolding respones are received, but not rendered in

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
D4b246038154d7cc2363256bd25a4fe0?d=identicon&s=25 Larry White (Guest)
on 2006-05-03 19:05
(Received via mailing list)
Hi i installed the latest ajaxscaffolding gem and generated a scaffold.
List works fine. Delete deletes, but the update doesn't show and the
busy
icon spins indefinitely. Pressing new or edit also causes the busy icon
to
spin, but again the ui doesn't update.

my development.log indicates the request was handled and (using firebug)
I'm
seeing this response:

new Insertion.Top("message-tbody", "\n<tr
id=\"message-create-1146611248468-row\" style=\"display:none;\">\n
<td id=\"message-create-1146611248468-cell\" class=\"create\"
colspan=\"9\">\n  \n    <form
action=\"/message/create/1146611248468?scaffold_id=message\"
href=\"/message/create/1146611248468?scaffold_id=message\"
id=\"message-create-1146611248468-form\" method=\"post\"
onsubmit=\"new
Ajax.Request('/message/create/1146611248468?scaffold_id=message',
{asynchronous:true, evalScripts:true,
onLoading:function(request){Element.show('message-create-1146611248468-loading-indicator');},
parameters:Form.serialize(this)}); return false;\">\n      \n
<input id=\"scaffold_id\" name=\"scaffold_id\" type=\"hidden\"
value=\"message\" />\n         \n      <h4>Create Message</h4>\n\n
 \n        <div id=\"message-create-1146611248468-messages\"
class=\"messages-container\"></div>\n      \n            \n
<fieldset>\n\t<div class=\"row\">\n\t\t<!--[form:message]-->\n<div
class=\"form-element\">\n  <label
for=\"message_referenced_object\">Referenced object</label>\n  <input
class=\"text-input\" id=\"message_referenced_object\"
name=\"message[referenced_object]\" size=\"30\" type=\"text\"
/>\n</div>\n\n<div class=\"form-element\">\n  <label
for=\"message_referenced_object_table\">Referenced object
table</label>\n  <input class=\"text-input\"
id=\"message_referenced_object_table\"
name=\"message[referenced_object_table]\" size=\"30\" type=\"text\"
/>\n</div>\n\n<div class=\"form-element\">\n  <label
for=\"message_title\">Title</label>\n  <input class=\"text-input\"
id=\"message_title\" name=\"message[title]\" size=\"30\" type=\"text\"
/>\n</div>\n\n<div class=\"form-element\">\n  <label
for=\"message_message_text\">Message text</label>\n  <textarea
cols=\"40\" id=\"message_message_text\" name=\"message[message_text]\"
rows=\"20\"></textarea>\n</div>\n\n<div class=\"form-element\">\n
<label for=\"message_deleted\">Deleted</label>\n  <select
id=\"message_deleted\" name=\"message[deleted]\"><option
value=\"true\">True</option>\n<option value=\"false\"
selected=\"selected\">False</option></select>\n</div>\n\n<div
class=\"form-element\">\n  <label
for=\"message_updated\">Updated</label>\n  <select
name=\"message[updated(1i)]\">\n<option
value=\"2001\">2001</option>\n<option
value=\"2002\">2002</option>\n<option
value=\"2003\">2003</option>\n<option
value=\"2004\">2004</option>\n<option
value=\"2005\">2005</option>\n<option value=\"2006\"
selected=\"selected\">2006</option>\n<option
value=\"2007\">2007</option>\n<option
value=\"2008\">2008</option>\n<option
value=\"2009\">2009</option>\n<option
value=\"2010\">2010</option>\n<option
value=\"2011\">2011</option>\n</select>\n<select
name=\"message[updated(2i)]\">\n<option
value=\"1\">January</option>\n<option
value=\"2\">February</option>\n<option
value=\"3\">March</option>\n<option
value=\"4\">April</option>\n<option value=\"5\"
selected=\"selected\">May</option>\n<option
value=\"6\">June</option>\n<option value=\"7\">July</option>\n<option
value=\"8\">August</option>\n<option
value=\"9\">September</option>\n<option
value=\"10\">October</option>\n<option
value=\"11\">November</option>\n<option
value=\"12\">December</option>\n</select>\n<select
name=\"message[updated(3i)]\">\n<option
value=\"1\">1</option>\n<option value=\"2\"
selected=\"selected\">2</option>\n<option
value=\"3\">3</option>\n<option value=\"4\">4</option>\n<option
value=\"5\">5</option>\n<option value=\"6\">6</option>\n<option
value=\"7\">7</option>\n<option value=\"8\">8</option>\n<option
value=\"9\">9</option>\n<option value=\"10\">10</option>\n<option
value=\"11\">11</option>\n<option value=\"12\">12</option>\n<option
value=\"13\">13</option>\n<option value=\"14\">14</option>\n<option
value=\"15\">15</option>\n<option value=\"16\">16</option>\n<option
value=\"17\">17</option>\n<option value=\"18\">18</option>\n<option
value=\"19\">19</option>\n<option value=\"20\">20</option>\n<option
value=\"21\">21</option>\n<option value=\"22\">22</option>\n<option
value=\"23\">23</option>\n<option value=\"24\">24</option>\n<option
value=\"25\">25</option>\n<option value=\"26\">26</option>\n<option
value=\"27\">27</option>\n<option value=\"28\">28</option>\n<option
value=\"29\">29</option>\n<option value=\"30\">30</option>\n<option
value=\"31\">31</option>\n</select>\n &mdash; <select
name=\"message[updated(4i)]\">\n<option
value=\"00\">00</option>\n<option value=\"01\">01</option>\n<option
value=\"02\">02</option>\n<option value=\"03\">03</option>\n<option
value=\"04\">04</option>\n<option value=\"05\">05</option>\n<option
value=\"06\">06</option>\n<option value=\"07\">07</option>\n<option
value=\"08\">08</option>\n<option value=\"09\">09</option>\n<option
value=\"10\">10</option>\n<option value=\"11\">11</option>\n<option
value=\"12\">12</option>\n<option value=\"13\">13</option>\n<option
value=\"14\">14</option>\n<option value=\"15\">15</option>\n<option
value=\"16\">16</option>\n<option value=\"17\">17</option>\n<option
value=\"18\">18</option>\n<option value=\"19\"
selected=\"selected\">19</option>\n<option
value=\"20\">20</option>\n<option value=\"21\">21</option>\n<option
value=\"22\">22</option>\n<option
value=\"23\">23</option>\n</select>\n : <select
name=\"message[updated(5i)]\">\n<option
value=\"00\">00</option>\n<option value=\"01\">01</option>\n<option
value=\"02\">02</option>\n<option value=\"03\">03</option>\n<option
value=\"04\">04</option>\n<option value=\"05\">05</option>\n<option
value=\"06\">06</option>\n<option value=\"07\"
selected=\"selected\">07</option>\n<option
value=\"08\">08</option>\n<option value=\"09\">09</option>\n<option
value=\"10\">10</option>\n<option value=\"11\">11</option>\n<option
value=\"12\">12</option>\n<option value=\"13\">13</option>\n<option
value=\"14\">14</option>\n<option value=\"15\">15</option>\n<option
value=\"16\">16</option>\n<option value=\"17\">17</option>\n<option
value=\"18\">18</option>\n<option value=\"19\">19</option>\n<option
value=\"20\">20</option>\n<option value=\"21\">21</option>\n<option
value=\"22\">22</option>\n<option value=\"23\">23</option>\n<option
value=\"24\">24</option>\n<option value=\"25\">25</option>\n<option
value=\"26\">26</option>\n<option value=\"27\">27</option>\n<option
value=\"28\">28</option>\n<option value=\"29\">29</option>\n<option
value=\"30\">30</option>\n<option value=\"31\">31</option>\n<option
value=\"32\">32</option>\n<option value=\"33\">33</option>\n<option
value=\"34\">34</option>\n<option value=\"35\">35</option>\n<option
value=\"36\">36</option>\n<option value=\"37\">37</option>\n<option
value=\"38\">38</option>\n<option value=\"39\">39</option>\n<option
value=\"40\">40</option>\n<option value=\"41\">41</option>\n<option
value=\"42\">42</option>\n<option value=\"43\">43</option>\n<option
value=\"44\">44</option>\n<option value=\"45\">45</option>\n<option
value=\"46\">46</option>\n<option value=\"47\">47</option>\n<option
value=\"48\">48</option>\n<option value=\"49\">49</option>\n<option
value=\"50\">50</option>\n<option value=\"51\">51</option>\n<option
value=\"52\">52</option>\n<option value=\"53\">53</option>\n<option
value=\"54\">54</option>\n<option value=\"55\">55</option>\n<option
value=\"56\">56</option>\n<option value=\"57\">57</option>\n<option
value=\"58\">58</option>\n<option
value=\"59\">59</option>\n</select>\n\n</div>\n\n<div
class=\"form-element\">\n  <label for=\"message_updated_by\">Updated
by</label>\n  <input class=\"text-input\" id=\"message_updated_by\"
name=\"message[updated_by]\" size=\"30\" type=\"text\"
/>\n</div>\n\n<div class=\"form-element\">\n  <label
for=\"message_lock_version\">Lock version</label>\n  <input
class=\"text-input\" id=\"message_lock_version\"
name=\"message[lock_version]\" size=\"30\" type=\"text\" value=\"0\"
/>\n</div>\n\n<!--[eoform:message]-->\n\n\t</div>\n</fieldset>\n
\n      <p class=\"form-footer\">\n      \t<input class=\"submit\"
name=\"commit\" type=\"submit\" value=\"Create\" />\n      \t\n
\t<a
href=\"/message/cancel/1146611248468?referring_action=create&amp;amp;scaffold_id=message\"
onclick=\"new
Ajax.Request('/message/cancel/1146611248468?referring_action=create&amp;scaffold_id=message',
{asynchronous:true, evalScripts:true,
onLoading:function(request){Element.show('message-create-1146611248468-loading-indicator');}});
return false;\">Cancel</a>    \t                          \n
\t<img src=\"/images/indicator.gif\" style=\"display: none;\"
id=\"message-create-1146611248468-loading-indicator\" alt=\"loading
indicator\" class=\"loading-indicator\" />\n    \t</p>\n    </form>\n
</td>\n</tr>\n");
Element.show("message-create-1146611248468-row");
Form.focusFirstElement('message-create-1146611248468-form');
new Effect.Highlight("message-create-1146611248468-cell",{});
Element.update("message-create-1146611248468-messages", "\n  \n\n
\n\n  \n\n\n\n\n");
Element.hide("message-new-loading-indicator", "message-empty-message");

I think this ok as well (but not entirely sure).
There are no javascript errors reported in the javascript console or in
firebug.

I pasted my ddl below, if that might help. I'm wondering if there's
something about the data that could be causing an issue.

I'm using Rails 1.1.2 withFirefox 1.5.0.2 on Windows.
I tried IE 6 as well with the same result.

Any help would be much appreciated.

CREATE TABLE message
(
  id serial NOT NULL,
  referenced_object int8 NOT NULL,
  referenced_object_table char(20) NOT NULL,
  title varchar(255) NOT NULL,
  message_text text,
  deleted bool NOT NULL DEFAULT false,
  updated timestamptz NOT NULL DEFAULT now(),
  updated_by int8 NOT NULL,
  lock_version int4 DEFAULT 0,
  CONSTRAINT message_pkey PRIMARY KEY (id)
)
0f1fa6b6ea69391ae1d1f64b33cb77b8?d=identicon&s=25 Eric Wagoner (Guest)
on 2006-05-03 19:05
(Received via mailing list)
On 5/2/06, Larry White <ljw1001@gmail.com> wrote:
> Hi i installed the latest ajaxscaffolding gem and generated a scaffold.
> List works fine. Delete deletes, but the update doesn't show and the busy
> icon spins indefinitely. . .

I had similar (but perhaps not the same) troubles on Windows boxes.
The generated .rhtml files had invalid (unix-style, perhaps?) tabs at
the beginning and sometimes at the end of the lines.

Converting the tabs to spaces (TextPad can do this automatically)
solved the problems.

It might not be your problem, though, because I was able to see errors
in my development log, but the symptoms were exactly the same.

-eric
D4b246038154d7cc2363256bd25a4fe0?d=identicon&s=25 Larry White (Guest)
on 2006-05-03 19:05
(Received via mailing list)
thank you, i'll try that.
3a10fc24918e39ff24e00d8094e019e5?d=identicon&s=25 Per Jørgensen (Guest)
on 2006-06-20 21:53
(Received via mailing list)
I have the same problem, did anyone solve this problem.

Regards

Per

On 5/2/06, Eric Wagoner <eric at ericwagoner.com
<http://lists.rubyonrails.org/mailman/listinfo/rails>> wrote:
>/
/>/ On 5/2/06, Larry White <ljw1001 at gmail.com
<http://lists.rubyonrails.org/mailman/listinfo/rails>> wrote:
/>/ > Hi i installed the latest ajaxscaffolding gem and generated a
scaffold.
/>/ > List works fine. Delete deletes, but the update doesn't show and
the
/>/ busy
/>/ > icon spins indefinitely. . .
/>/
/>/ I had similar (but perhaps not the same) troubles on Windows boxes.
/>/ The generated .rhtml files had invalid (unix-style, perhaps?) tabs
at
/>/ the beginning and sometimes at the end of the lines.
/>/
/>/ Converting the tabs to spaces (TextPad can do this automatically)
/>/ solved the problems.
/>/
/>/ It might not be your problem, though, because I was able to see
errors
/>/ in my development log, but the symptoms were exactly the same./
This topic is locked and can not be replied to.