I can not come up with a solution to what should be a very simple problem. I need to have a submit button on a form with the follow criteria:
1. It has to send a name/value pair to the server where I can set both the name and the value. I have a script that acts differently depending on what submit button gets clicked.
2. I have to at worst, be able to put my own text on the button, preferable be able to use an image.
3. It should be compatible with most browsers.
So I tried <input type="submit">. The problem is the value that is sent to the server via the "value" attribute is also what appears on the button. so if I’m trying to send a value like "12-15" to the server, that's also what shows up on the button to the user.
So I tried <input type="image">. The problem here is that the value sent to the server is always the x-y cordinents of the mouse when clicked. I have no way to set the value.
So I tried <button type="submit">. This one just seems to very buggy. IE for MAC would submit the page but wouldn't send the name/value pair so my script wouldn't act correctly. IE 6 on a PC would send the name so the script would work but wouldn't receive the right value. It seems to actually send as a value, whatever is between the <button> tags which in my case is an <image> tag
If anybody can help me with this it would be greatly appreciated! It's driving me crazy!
Thanks,
Jonathan
1. It has to send a name/value pair to the server where I can set both the name and the value. I have a script that acts differently depending on what submit button gets clicked.
2. I have to at worst, be able to put my own text on the button, preferable be able to use an image.
3. It should be compatible with most browsers.
So I tried <input type="submit">. The problem is the value that is sent to the server via the "value" attribute is also what appears on the button. so if I’m trying to send a value like "12-15" to the server, that's also what shows up on the button to the user.
So I tried <input type="image">. The problem here is that the value sent to the server is always the x-y cordinents of the mouse when clicked. I have no way to set the value.
So I tried <button type="submit">. This one just seems to very buggy. IE for MAC would submit the page but wouldn't send the name/value pair so my script wouldn't act correctly. IE 6 on a PC would send the name so the script would work but wouldn't receive the right value. It seems to actually send as a value, whatever is between the <button> tags which in my case is an <image> tag
If anybody can help me with this it would be greatly appreciated! It's driving me crazy!
Thanks,
Jonathan