1 reply [Last post]
naijatexanstud
Offline
Regular
Last seen: 18 years 11 weeks ago
Joined: 2003-09-12
Posts: 13
Points: 0

I've noticed that there's some decent CSS here:
http://www.ups.com/content/us/en/index.jsx

The thing that baffles me is their login form. If you look at the HTML, you'll notice that there's no input of type submit, and no Javascript around that small square blue image with the white arrow on it that submits the form. If you click in either the userid or password field and then hit the Enter key, you'll notice that the focus shifts over to that little image--how, I don't know! As you can see, there's no Javascript associated with it, and as far as I can tell, the CSS only specifies formatting, nothing tricky:

<td class="cffffff"><input alt="Login" border="0" height="18" name="repl_fname" src="/img/btn_arrow_large.gif" type="image" width="17"></td>

Is it possible for a form to be submitted with an input of type="image" and if so, how does the form know that that's what initiates the POST? It's literally as if the form is waiting for that image to be clicked, but I wouldn't know how to tell one of my own forms to do that...

:?:

eff
Offline
Regular
Berlin, Germany
Last seen: 17 years 12 weeks ago
Berlin, Germany
Timezone: GMT+1
Joined: 2004-09-10
Posts: 18
Points: 0

how did they submit this form with a type=&quot;image&quot;

http://www.htmlhelp.com/reference/html40/forms/input.html wrote:
The image input type specifies a graphical submit button. The SRC attribute must be included to specify the URI of the image. The ALT attribute should be used to give replacement text for those not loading images.

So you don't have to tell your form to do that since it knows it should do exactly that.

You can also create buttons which are no submit buttons, but I am not quite sure about the validity:

<form action="button.htm">
<div>
<button name="clickme" type="button" value="somevalue" onClick="self.location.href='http://example.org/'">
 <p><img src="http://www.felixwuest.de/eye.jpg" border="0" alt="amazing eye"><br>
 <b>effs amazing eye!</b></p>
</button>
</div>
</form>

Good coding Wink

Fruits rock!