There are few options to approach it:
a) use w3c validator as a guide and not 'holy-grail' [1]
b) don't use ajax helper (you know that inline js is evil ? i would
say more evil than a unescaped ampersand in the code;)
c) connects with b - try other great js libraries - like jquery - they
are really easy to learn and use. (you can look how Felix wants to
dominate the world with jquery (presentation) [2])

HTH,

[1] http://www.7nights.com/asterisk/archive/2004/10/standards-equals-validation
[2] http://cakephp.org/downloads/index/CakeFest

On Thu, May 1, 2008 at 12:03 AM, Alberto <[EMAIL PROTECTED]> wrote:
>
>  Hi, I think it could be a bug in the ajax class.
>
>  This is the php code
>
>  <?php echo $ajax->submit('Enviar', array(
>                 'url' => 'contact',
>                 'complete' => 'Element.hide(\'cargando\')',
>                 'update'=>array('enviado','noenviado','imagen'),
>                  'loading' => 'Element.show(\'cargando\')' ,
>                 'class' => 'enviar'
>                   ));
>  ?>
>
>
>  and here the result in html
>
>  <div class="submit"><input type="submit"
>  complete="Element.hide('cargando')" class="enviar" value="Enviar"
>  id="submit811300255" onclick="event.returnValue = false; return
>  false;" /></div><script type="text/javascript">
>  //<![CDATA[
>  Event.observe("submit811300255", 'click', function(event) { new
>  Ajax.Updater(document.createElement('div'),'/contacta/contact',
>  {asynchronous:true, evalScripts:true, onComplete:function(request,
>  json) {Element.hide('cargando')}, onLoading:function(request)
>  {Element.show('cargando')},
>  parameters:Form.serialize(Event.element(event).form), requestHeaders:
>  ['X-Update', 'enviado noenviado imagen']}) }, false);
>  //]]>
>  </script>
>
>
>  The problematic part is
>
>  complete="Element.hide('cargando')"
>
>  that shouldn't be there in the input tag, so it fails in the
>  validation with w3c. I don't know how to solve this
>
>  Thank you
>  Alberto
>
>  >
>



-- 
Marcin Domanski
http://kabturek.info

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

Reply via email to