Problems with <form> in Safari - only first click will POST to _blank target

egenuntoi

New Member
I am using PHP to generate 10 forms on a page which attach an image as the button and POST hidden values to a _blank target. This works ok in Firefox, all 10 buttons submit and post to a new window. In Safari however only the first button i click will work (whichever one I choose) after that none of the buttons (forms) submit and POST to a new window (!!! whats going on??)Heres the code -\[code\]$id=getId();echo "<form name=\"clickthrough$id\" action=\"click_through.php\" method=\"POST\" target=\"_blank\"><input type=\"image\" src=http://stackoverflow.com/"images/buttons/buynow_a.gif\" name=\"buynow\"/><input type=\"hidden\" name=\"id\" value=http://stackoverflow.com/"".$id."\"/></form>";\[/code\]Nothing strange here - the id is actually the id of a song in my database which i have simplified for showing here - but I included it on the end of the form name just incase this was causing the problem.So to recap I end up with 10 buy now buttons on a page - all of which should post through to a PHP script. The scripts work fine. However in safari once i have pressed any buy now button all of the others stop working (until I refresh the page)why is this?-- here is the final html that is generated for the buttons\[code\]<form name="clickthrough1728" action="click_through.php" method="POST" target="_blank"><input type="image" src="http://stackoverflow.com/questions/3840256/images/buttons/buynow_a.gif" name="buynow"/><input type="hidden" name="id" value="http://stackoverflow.com/questions/3840256/1728"/><input type="hidden" name="location" value="http://stackoverflow.com/questions/3840256/UK"/></form><form name="clickthrough1724" action="click_through.php" method="POST" target="_blank"><input type="image" src="http://stackoverflow.com/questions/3840256/images/buttons/buynow_a.gif" name="buynow"/><input type="hidden" name="id" value="http://stackoverflow.com/questions/3840256/1724"/><input type="hidden" name="location" value="http://stackoverflow.com/questions/3840256/UK"/></form><form name="clickthrough1718" action="click_through.php" method="POST" target="_blank"><input type="image" src="http://stackoverflow.com/questions/3840256/images/buttons/buynow_a.gif" name="buynow"/><input type="hidden" name="id" value="http://stackoverflow.com/questions/3840256/1718"/><input type="hidden" name="location" value="http://stackoverflow.com/questions/3840256/UK"/></form>\[/code\]....I have just tried copying this to a new html file and testing and the same thing happens - the first click will open a new window but no buttons after that will post the form
 
Back
Top