Hi, every bakers.

I am using Cake for a while already. Now, I wanna make a ajax function
to check username is exist or not when they wanna sign-up.

So, I add following lines in my register.thtml:
----
 <form action="<?php echo $html->url('/users/register'); ?>"
method="post">

<?php echo $html->input('User/email', array('size' =>
'20','id'=>'UserEmail'))?>
<?php echo
$ajax->observeField('UserEmail', array('frequency'=>1,'url'=>'/users/
hello/','update'=>'wo'));?>

</form>

<div id="wo">
---some result from users/hello
</div>

BUT, it is keeping tell me that :

Error: Form is not defined
sources:http://localhost/zhoumo/users/register
line:78
------------------Line 78--------------
<input name="data[User][email]"  size="20" id="UserEmail" value=""
type="text" /><script type="text/javascript">new
Form.Element.Observer('UserEmail', 1, function(element, value) {new
Ajax.Updater('wo','/zhoumo/users/hello/', {asynchronous:true,
evalScripts:true, parameters:Form.Element.serialize('UserEmail'),
requestHeaders:['X-Update', 'wo']})})</script>
        ------------------------------------------

Did I missing any thing?


2-------------

I use normal php way to setcookies( );

It works when I set it in one page. But When I read the cookies and
rewrite it in a ajax-page. I cant read it in other pages.

Is it any thing confict with cake or something else ?

Thanks


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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