kirill578 Posted December 3, 2010 Share Posted December 3, 2010 <img src=theproblem.gif><br><br> <IMG SRC="qut.gif" BORDER=0> <a href='problem.php?problem_id=81'> <b>Test Test Test Test Test Test Test Test Test</b></a> <IMG SRC="qut.gif" BORDER=0><br> <form action="problem.php?problem_id=81" METHOD="POST"> <input type="image" src="bluestar.jpg" name="client_rate" value="1" alt="1"/> <input type="image" src="blackstar.jpg" name="client_rate" value="2" alt="2"/> <input type="image" src="blackstar.jpg" name="client_rate" value="3" alt="3"/> <input type="image" src="blackstar.jpg" name="client_rate" value="4" alt="4"/> <input type="image" src="blackstar.jpg" name="client_rate" value="5" alt="5"/><br> <EM>1</EM> </form> IE doesn't submit This form but firefox does. What is the problem and how can I fix it? Quote Link to comment https://forums.phpfreaks.com/topic/220587-ie-doesnt-submit-form-but-firefox-does/ Share on other sites More sharing options...
OldWest Posted December 3, 2010 Share Posted December 3, 2010 what doctype are you defining your page as? And you should really decide if you want to use HTML or xhtml because right now your code is mixed up.. That's where I would start. Good luck! Quote Link to comment https://forums.phpfreaks.com/topic/220587-ie-doesnt-submit-form-but-firefox-does/#findComment-1142660 Share on other sites More sharing options...
kirill578 Posted December 3, 2010 Author Share Posted December 3, 2010 what doctype are you defining your page as? And you should really decide if you want to use HTML or xhtml because right now your code is mixed up.. That's where I would start. Good luck! I have no a clue what is doctype.. I started programming with php / HTML about week ago so i don't really understand everything... There is a link, maybe it'll answer your questions http://woenti.mypressonline.com/problem.php?problem_id=23 Quote Link to comment https://forums.phpfreaks.com/topic/220587-ie-doesnt-submit-form-but-firefox-does/#findComment-1142663 Share on other sites More sharing options...
PFMaBiSmAd Posted December 3, 2010 Share Posted December 3, 2010 IE submits your form just fine. It's your form processing code that is not reading the data correctly. Check out this link - http://us2.php.net/manual/en/faq.html.php#faq.html.form-image The HTML specification requires that browsers send the x and y coordinates where the image was clicked. It is not even part of the HTML specification that browsers send the name/value of a type='image' field and you will find that IE and I believe Opera don't send the name/value, while the other browsers do their own thing and do send it. Once you change your form processing code so that it checks either the _x or _y variation of the name="" attribute (you will need to give each of your images a different name="" in order to be able to detect which one was clicked), your code will work in all the browsers. Quote Link to comment https://forums.phpfreaks.com/topic/220587-ie-doesnt-submit-form-but-firefox-does/#findComment-1142721 Share on other sites More sharing options...
kirill578 Posted December 3, 2010 Author Share Posted December 3, 2010 IE submits your form just fine. It's your form processing code that is not reading the data correctly. Check out this link - http://us2.php.net/manual/en/faq.html.php#faq.html.form-image The HTML specification requires that browsers send the x and y coordinates where the image was clicked. It is not even part of the HTML specification that browsers send the name/value of a type='image' field and you will find that IE and I believe Opera don't send the name/value, while the other browsers do their own thing and do send it. Once you change your form processing code so that it checks either the _x or _y variation of the name="" attribute (you will need to give each of your images a different name="" in order to be able to detect which one was clicked), your code will work in all the browsers. Thank you, your answer helped me a lot. I created form for each star with hidden inputs and it is working quite well. there is the CODE: <form action="problem.php?problem_id=42" METHOD="POST"> <input type="hidden" name="client_rate" value="1"> <input type="image" src="disbluestar.jpg" DISABLED alt="1"> </form> <form action="problem.php?problem_id=42" METHOD="POST"> <input type="hidden" name="client_rate" value="2"> <input type="image" src="disbluestar.jpg" DISABLED alt="2"> </form> <form action="problem.php?problem_id=42" METHOD="POST"> <input type="hidden" name="client_rate" value="3"> <input type="image" src="disbluestar.jpg" DISABLED alt="3"> </form> <form action="problem.php?problem_id=42" METHOD="POST"> <input type="hidden" name="client_rate" value="4"> <input type="image" src="disbluestar.jpg" DISABLED alt="4"> </form> <form action="problem.php?problem_id=42" METHOD="POST"> <input type="hidden" name="client_rate" value="5"> <input type="image" src="disblackstar.jpg" DISABLED alt="5"> </form> Quote Link to comment https://forums.phpfreaks.com/topic/220587-ie-doesnt-submit-form-but-firefox-does/#findComment-1142751 Share on other sites More sharing options...
PFMaBiSmAd Posted December 4, 2010 Share Posted December 4, 2010 Or you could have just used a different name for each type='image' field using one form and had a lot less HTML. Quote Link to comment https://forums.phpfreaks.com/topic/220587-ie-doesnt-submit-form-but-firefox-does/#findComment-1142894 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.