good day great folks..i've been encountering same problem here..i have 2
variables in my function to pass in my controller...i just cant do it right
trying lot of options already..here's my code:
$(function() {
$('#client-login').bind('submit',function(event){
var email = $('#email').val();
var password = $('#password').val();
$.post('{{ constant('BB_URL_API') }}guest/client/login',
$(this).serialize(),
function(json) {
if(json.error) {
alert(json.error.message);
} else {
parent.window.location
='http://localhost/course_booking/index.php/display/client_info/'+email
+password; //this doesnt work...what is the right approach in
this,,pls help
}
}, 'json');
return false;
});
});
and how should my controller look...?thanks people
On Monday, May 21, 2012 10:49:24 AM UTC+8, Bruce Wade wrote:
>
> If param1 and param2 are from javascript:
>
> 1) You can not write the code in headers as you have current written you
> will have to use something like the following:
> <h3><a id='url_with_params'>....</a></h3>
>
> // javascript function:
> function generateURL(param1, param2) {
> url = '/action/' + param1 + "/" + param2;
> $("url_with_params").attr('href', url);
> }
>
> On Sun, May 20, 2012 at 7:41 PM, Ashraf Mansour
> <[email protected]<javascript:>
> > wrote:
>
>> both
>>
>> <h3><a href="{{=URL('action')}}/**param1/param2">....</a></h3>
>>
>> and
>>
>> <h3><a href={{=URL('action')}}/**param1/param2>....</a></h3>
>>
>>
>> are not working ( they are not showing the values of param1 and param2 )
>>
>>
>>>
>
>
> --
> --
> Regards,
> Bruce Wade
> http://ca.linkedin.com/in/brucelwade
> http://www.wadecybertech.com
> http://www.fittraineronline.com - Fitness Personal Trainers Online
> http://www.warplydesigned.com
>
>
--