html - Differences between type="image" and type="submit"? -


(this question related this question)

i've simple form:

<html> <head> </head> <body>     <form name="aspnetform" method="post" action="http://www.startupseeds.com/default.aspx">         <input type="hidden" name="__viewstate" id="__viewstate" value="..." />         <input type="hidden" name="__eventvalidation" id="__eventvalidation" value="/wewcalmynwrbqkoz5h1callmob9dgkmz6hzawkf8boxcqkc7qlkawk5knvvaqkk7amsa53tgbgr+ji7lti0eykvqumzrf/g" />         <input name="ctl00$login1$tbemail" type="text" />         <input name="ctl00$login1$tbpassword" type="password" />          <input type="image" name="ctl00$login1$iblogin" />     </form> </body> </html> 

when change this:

<input type="image" name="ctl00$login1$iblogin" /> 

to this:

<input type="submit" name="ctl00$login1$iblogin" /> 

...it doesn't work. difference in code type="submit" instead of type="image". didn't know there differences between them (in key/value in http) - how can "submit" work?

thank you.

the difference that:

<input type="image" name="ctl00$login1$iblogin" /> 

will result in 2 form fields: ctl00$login1$iblogin.x , ctl00$login1$iblogin.y indicate part of image clicked, although have no image in markup.

from 17.4.1 control types created input of html 4.01 specification:

image

creates graphical submit button. value of src attribute specifies uri of image decorate button. accessibility reasons, authors should provide alternate text image via alt attribute.

when pointing device used click on image, form submitted , click coordinates passed server. x value measured in pixels left of image, , y value in pixels top of image. submitted data includes name.x=x-value , name.y=y-value "name" value of name attribute, , x-value , y-value x , y coordinate values, respectively.


Comments

Popular posts from this blog

ruby - When to use an ORM (Sequel, Datamapper, AR, etc.) vs. pure SQL for querying -

php - PHPDoc: @return void necessary? -

c++ - Convert big endian to little endian when reading from a binary file -