[Date Prev][Date Next][Thread Prev][][Date Index][Thread Index]

input type="image"



こういう質問もきていました。

| 2.  Go to the secure site of Barnes and Noble, for
|     example.  I enter my user name and password.
|     When I submit the form (pressing submit
|     button) I am prompted by IMAGE: in the
|     minibuffer.  At this point I should enter my
|     account instead.

どこかを聞いたところ

| Ok.  go to 
| http://www.bn.com
| Click on admin_acct.  Click on order status.  Fill
| in your e-mail address.  (You don't need to have an
| account for this test.)  Then password (just
| anything).  Then click on submit.  You will be
| prompted in the minibuffer by IMAGE:  Well this is
| the way it works on my side.  W3m works fine.  You
| enter your account.    In your case it should
| refuse (if you enter fictitious data).  

というわけで http://www.bn.com/ の admin_acct から order status
へいって e-mail address と password をいれて submit をえらぶと
確かに IMAGE: と聞いてきます。

調べてみると

 <input type="image" SRC="/gresources/bcontinue.gif" BORDER="0" NAME="continue">
になっていました。
w3m-form.el で inputタグで type="image"の処理ができてないようです。

HTML 4.01 specによると以下の通りなので type="submit" と同じように
動くようにすればいいのではないでしょうか?
http://www.w3.org/TR/html4/interact/forms.html#input-control-types

 image
    Creates a graphical submit button. The value of the src attribute specifies
    the URI of the image that will decorate the button. For accessibility
    reasons, authors should provide alternate text for the image via the alt
    attribute.

    When a pointing device is used to click on the image, the form is submitted
    and the click coordinates passed to the server. The x value is measured in
    pixels from the left of the image, and the y value in pixels from the top
    of the image. The submitted data includes name.x=x-value and name.y=y-value
    where "name" is the value of the name attribute, and x-value and y-value
    are the x and y coordinate values, respectively.

    If the server takes different actions depending on the location clicked,
    users of non-graphical browsers will be disadvantaged. For this reason,
    authors should consider alternate approaches:

     □ Use multiple submit buttons (each with its own image) in place of a
        single graphical submit button. Authors may use style sheets to control
        the positioning of these buttons.
     □ Use a client-side image map together with scripting.

-- 
鵜飼文敏