|
Posted by Rik on 01/22/07 21:27
luigi7up wrote:
> I tried this:
>
> <button type='submit' name='task[0]' value='refresh' title='dodaj u
> koaricu' >Bla Bla</button>
> <button type='submit' name='task[0]' value='add' title='dodaj u
> koaricu'>Bla</button>"
>
> still no result in IE.
Please don't topppost. I'll forgive you this time as I was too lazy to
check my abviously now faulty answer :-P.
Indeed, running the following:
<?php
readfile('php://input');
?>
<form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<button type='submit' name='task' value='refresh' title='dodaj u
koaricu' >Bla Bla</button>
<button type='submit' name='task' value='add' title='dodaj u
koaricu'>Bla</button>
</form>
Clicking the first button:
Results in MSIE:
task=Bla+Bla&task=Bla
In Firefox:
task=refresh
So, 2 differences: the one posts both _contents_ of 'task', the later
overriding the first, the other only posts the clicked button with the
_value_.
I don't know which one's at fault here, as I never use the <button>, and
now I know why :-).
The other option I gave was just to use a styled <input type="submit">, now
I know this one works without a doubt, as I use it regulary.
--
Rik Wasmus
[Back to original message]
|