Forum: Ruby on Rails question on rails , form_remote_tag and backbase

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
bob mines (Guest)
on 2005-11-25 19:11

I been reading your book and going through the examples but i am stuck
on th using the form_remote_tag.

I am using the Backbase  ajax framework  with rails and protoype.js

The following form.rhtml file

<% if @guess %>
        <p> It seeems '<%=h @guess %>' is hardly the right answer</p>
<% end %>

<%= form_remote_tag(:update => "update_div",
                        :url  => {:action => :guess } ) %>

     <label for="guess">Ruby on ....? </label>
     <%= text_field_tag :guess %>
     <%= submit_tag "Post with Ajax" %>
<%= end_form_tag %>

and template file

<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"" ><html
xmlns="" xmlns:b=""
<s:execute xmlns=""
xmlns:b=" "

<script type="text/javascript" src="/Backbase/3_1/bpc/boot.js"
<%= javascript_include_tag "prototype" %>

<body onload="bpc.boot ('/Backbase/3_1/');">
<xmp backbase="true">

<div id="update_div">
        <%= render(:partial => 'form') %>

It generates the html below

?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
<html xmlns=
"" xmlns:b="
" xmlns:s="">
<s:execute xmlns=""
xmlns:b="" xmlns:s="">

<script type="text/javascript"
src="/Backbase/3_1/bpc/boot.js" ></script>
<script src=
"/javascripts/prototype.js" type="text/javascript"></script>

<body onload="bpc.boot('/Backbase/3_1/');">

<div id="update_div">

 action="/refi/guess" method="post"
onsubmit="new Ajax.Updater('update_div', '/refi/guess',
{asynchronous:true, evalScripts:true, parameters:Form.serialize(this)});
return false;">

label for="guess">Ruby on ....? </label>
 id="guess" name="guess" type=
"text" />
     <input name="commit"
type="submit" value="Post with Ajax" />



but the backbase box "<b:box>" disappears when i submit the form and the
url changes to .../guess instead of doing a partial update.

If i take out the backbase code the rails/ruby code works as it should.

Any suggestions? thx.

This topic is locked and can not be replied to.