[eluser]Twisted1919[/eluser]
Use jquery and make an ajax call :
Code:
$.ajax({
url : '<?php echo site_url('controller/method/process');?>',
type:'post',
data:'url='+url+'&q='+str ,
success:function(msg)
{
alert(msg);
}
});
This would be the most right solution , using jquery as it's a mature javascript framework , very used and cross browser compatible .