Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
180
rated 0 times [  185] [ 5]  / answers: 1 / hits: 16597  / 11 Years ago, wed, august 28, 2013, 12:00:00

This is not working in my codeigniter function i have the id and cannot get that id.Please help me. this is my view and i am trying to send my id through the function.



<script type=text/javascript>
function makeajaxcall(id) {
//alert(id);
var r = confirm(Do you want to Delete);
if (r == true) {
window.location.href = <?php echo site_url('controller_d/login/admin_link_delete_user?id='.id);?>;
} else {
x = You pressed Cancel!;
alert(x);
}

}
</script>

More From » php

 Answers
124

Change this line:



window.location.href = <?php echo site_url('controller_d/login/admin_link_delete_user?id='.id);?>;


To:



window.location.href = <?php echo site_url('controller_d/login/admin_link_delete_user');?>?id=+id;

[#76084] Monday, August 26, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
turnerf

Total Points: 620
Total Questions: 101
Total Answers: 109

Location: French Polynesia
Member since Tue, Jul 7, 2020
4 Years ago
turnerf questions
;