I'm not sure if this is an existing error, but after debugging the web application I'm working on, I found some weird behavior in Safari 5. Here is the scenario:
Page A ---- HTTP POST ----> Page B ---- HTTP POST ----> Page C
Page A:
<body onload="document.forms[0].submit()"> <form method="post" action="pageB.php"> <input type="hidden" name="display" value="ABC" /> </form> </body>
Page B:
<body onload="document.forms[0].submit()"> <form method="post" action="pageC.php"> <input type="hidden" name="display" value="123" /> <input type="hidden" name="extra" value="XXX" /> </form> </body>
Page C:
<body> <?php print_r($_REQUEST); ?> </body>
Of all the browsers that I have tested so far, only Safari 5 (Mac version) displays the value “ABC” to display name = ", and I can still see the value“ XXX ”for the“ extra ”field. All other browsers ( including Safari 3, 4) will display the value "123", which is the correct value.
For some reason, I still need to submit the form using for pages A and Page B, with this condition, what is the workaround for Safari 5? (To force him to enter the correct value on page B, which should be 123 instead of sorting, for example, transferring the value from page A to page C)
Many thanks!
- Edit1: only happens on Mac OS (Snow Leopard, Lion) Safari 5
- Edit2: Make the example clearer
source share