[eluser]coolfactor[/eluser]
If you want the form to be submitted with your revised URL, then you need to assign an ID to the form, adjust its action parameter, then submit it.
Example:
Code:
<?php echo form_open(array('name' => 'customer/action', 'id' => 'frmCustomerAction')); ?>
<input type="image" name="edit" onclick="ExecuteEdit()" src="<?php echo base_url();?>images/edit.gif" value="Edit">
<?php echo form_close(); ?>
And then your java.script:
Code:
function EditExecute() {
var frm = document.getElementById('frmCustomerAction');
frm.action = mywebsiteurl + "customer/action" +"?d="+editKey+"&sid;="+Math.random();
}
That should give you the effect you want. That's not the only approach to use, but I'd need more information about your application before I could narrow in on the best approach. Another way, for example, is to capture the "onsubmit" event on the form tag itself and then have the action adjusted there.
By the way, this post belongs in the Code and Application Development forum, not the CodeIgniter Discussion forum. It's sometimes difficult to distinguish the two, but this is not a CodeIgniter question, but rather a Javascript/HTML question.