i have this jquery
$('.delete_step').live('click', function(e) {
e.preventDefault();
var delete_location = 'http//<?php echo $_SERVER["SERVER_NAME"]; ?>?route=module/cart/delete_builder_step';
console.log(delete_location);
var response = confirm("Are you sure you want to delete this step?");
if(response){
$.post( delete_location, { step_id: $(this).attr("rel"), builder_id: "<?php print $builder_id; ?>" },
function(result) {
// window.location.reload();
});
}
});
and all looks good other then in my console I get this
http//localhost?route=module/cart/delete_builder_step
which is right but the post is going here
http://localhost/shop_pos/admin/http//localhost?route=module/cart/delete_builder_step
is there a way to use jQuery post to not be relative and use the full url i specify
You’re missing the
:inhttp://.The correct version: