Welcome Guest, Not a member yet? Register   Sign In
How to append params to link_to_remote
#1

[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.


Messages In This Thread
How to append params to link_to_remote - by El Forum - 08-12-2008, 11:48 PM
How to append params to link_to_remote - by El Forum - 09-28-2010, 08:33 PM



Theme © iAndrew 2016 - Forum software by © MyBB