Hello,
With document ready I can add javascript to edit page but there is something wrong in my code that I didn't resolved yet and I don't kknow how to do it.
On the top of the form there is a select "choose language".
Then, under it, I would like to use ajax to make a query a put using language chosen as parameter.
The problem I have is I don't know how to write the url of my model and the function that make the query.
This is my document ready code...
$content['documentready'] = "$(\"#field_nav_language_chzn .chzn-single\").change(function(){ $.ajax({ 'url':<?php echo base_url() ?>models/Model_content/select_options($(\"field_nav_language_chzn .chzn-single\").val()), 'success':function(response){ $(\"#field_nav_parent_chzn .chzn-single\").value(response); } }); "
Does somebody made something like that or know where is the issue?
Thanks for all.
Best.