Jump to content

IE doesn't submit form but firefox does


kirill578

Recommended Posts

<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?

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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>

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.