[eluser]Unknown[/eluser]
I am trying to do a ajax username duplicate check. The code I am using is as follows:
Code:
$this->ajax->link_to_remote("check username", array('url'=> "/user/username_dpcheck/", 'loading' => "Element.show('indicator_username')",'complete' => "Element.hide('indicator_username'),alert('dd')",'update' => 'username_check'));
What I am trying to do is to append a parameter behind url, which is /user/username_dpcheck/ and make it look like
/user/username_dpcheck/parameter. Therefore, when I click on "check username", the action URL will be
/user/username_dpcheck/parameter
The parameter is the value of an input field, which I try to get by using getElementById('field').value
I am wondering whether there is a good way to accomplish this.
Another question is when I try to use observe_field, it gives me following error message
A PHP Error was encountered
Severity: Notice
Message: Undefined index: function
Filename: libraries/Ajax.php
Line Number: 247
Any help will be very much appreciated. Thanks a lot for all your quick response and help to my previous questions.