Welcome Guest, Not a member yet? Register   Sign In
IE 6 and Cancel-Button in POST - form
#1

[eluser]sl3dg3hamm3r[/eluser]
Hi there

I've got a strange behaviour by IE 6. Before I proceed with any submitted form, I check if the cancel-button was hit (usually there are always two buttons: save and cancel):
Code:
if ($this->input->post('cancel') !== false) {
   /* 'Cancel' - Button, show overview */
   $this->index();
   return;
}

But in IE 6, the Post-variable 'cancel' is in either way submitted, no matter if it was hit or not. In other words: my application acts in IE 6 as if the cancel-button is hit each time. No chance to save anything. Is there a way to figure out which button was hit if IE 6 was used?

Here the HTML of the button:
Code:
<button name="cancel" type="submit" >Cancel</button>

Sl3dg3
#2

[eluser]sl3dg3hamm3r[/eluser]
... or I ask differently: if you use two buttons within the same form, how do you check which one was pressed? My method doesn't seem to work to my satisfaction, at least not in IE6...




Theme © iAndrew 2016 - Forum software by © MyBB