Nathan,

good of you to 'volunteer' for this shitty detail <:)

I worked my _login.haml down to this pittyful slump of code:

- form_remote_tag( :update=> {:success => 'documentcontent'}, :url =>
{ :controller => 'account', :action => 'ajax_login' }) do
  %label Brugernavn
  = text_field_tag 'login', '', { :autocomplete=>'off', :onfocus=>
'new Effect.Highlight(this, { duration: 1.5 });'}
  %label Adgangskode
  = password_field_tag 'password', '',
{ :autocomplete=>'off', :onfocus=> 'new Effect.Highlight(this,
{ duration: 1.5 });'}
  %button{ :type=>"submit", :style=>"width: 100px;"} Login
  = if ( flash[:error] ) then flash[:error] end

and still - when I try submitting the form, account/ajax_login renders
partially account/_login.haml as if it had been asked to do a
elem.innerText=[contents of _login.haml] (see snippets below)

And keep in mind that on the virgin (virgin because once 'polluted'
the <div id='documentcontent'> is not able to perform anything
resembling normality) run, _login.haml renders partially OK (as I
have

    #documentcontainer
      #documentcontent= logged_in? ? render( :partial=>'motd') :
render( :partial=>'account/login')
  / main end

in my welcome/index.haml...

In Firefox I peeked at the generated source for the page - and this
snippet hatched in front of my eyes :)

....8<.........
      <div style="left: 0px; top: 0px;" id="documentcontent">try {
Element.update("documentcontent", "<form action="\&quot;/account/
ajax_login\&quot;" method="\&quot;post\&quot;" onsubmit='\"new'
ajax.updater({success:="" documentcontent="" },="" account=""
ajax_login="" ,="" {asynchronous:true,="" evalscripts:true,=""
parameters:form.serialize(this)});="" return="" false;\="">\n
<label>Brugernavn</label>\n  <input autocomplete="\&quot;off\&quot;"
id="\&quot;login\&quot;" name="\&quot;login\&quot;" onfocus='\"new'
effect.highlight(this,="" {="" duration:="" 1.5="" });\=""
value="\&quot;\&quot;" type="\&quot;text\&quot;">\n
<label>Adgangskode</label>\n  <input autocomplete="\&quot;off\&quot;"
id="\&quot;password\&quot;" name="\&quot;password\&quot;"
onfocus='\"new' effect.highlight(this,="" {="" duration:="" 1.5="" });
\="" value="\&quot;\&quot;" type="\&quot;password\&quot;">\n  <button
style="width: 100px;" type="submit">Login</button>\n  Du har opgivet
en kombination af brugernavn og adgangskode, som ikke kan genkendes!
Prøv venligst igen!\n</form>\n");
} catch (e) { alert('RJS error:\n\n' + e.toString());
alert('Element.update(\"documentcontent\", \"<form action="\\\&quot;/
account/ajax_login\\\&quot;" method="\\\&quot;post\\\&quot;"
onsubmit='\\\"new' ajax.updater({success:\="" documentcontent
\="" },="" \="" account="" ajax_login\="" ,="" {asynchronous:true,=""
evalscripts:true,="" parameters:form.serialize(this)});="" return=""
false;\\\="">\\n  <label>Brugernavn</label>\\n  <input autocomplete="\\
\&quot;off\\\&quot;" id="\\\&quot;login\\\&quot;" name="\\\&quot;login\
\\&quot;" onfocus='\\\"new' effect.highlight(this,="" {=""
duration:="" 1.5="" });\\\="" value="\\\&quot;\\\&quot;" type="\\
\&quot;text\\\&quot;">\\n  <label>Adgangskode</label>\\n  <input
autocomplete="\\\&quot;off\\\&quot;" id="\\\&quot;password\\\&quot;"
name="\\\&quot;password\\\&quot;" onfocus='\\\"new'
effect.highlight(this,="" {="" duration:="" 1.5="" });\\\="" value="\\
\&quot;\\\&quot;" type="\\\&quot;password\\\&quot;">\\n  <button
style="" 100px;\="" type="\'submit\'">Login</button>\\n  Du har
opgivet en kombination af brugernavn og adgangskode, som ikke kan
genkendes! Prøv venligst igen!\\n</form>\\n\");'); throw e }</div>
....8<.........


On Jun 5, 7:13 pm, Nathan Weizenbaum <[EMAIL PROTECTED]> wrote:
> Can you work this down to a minimal case (both in terms of Haml and Ruby
> code) that still exhibits this behavior?
>
> - Nathan
> > "try { Ajax.Updater....bla bla bla"


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Haml" 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/haml?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to