in reply to Re: POST from a hyperlink
in thread POST from a hyperlink

<input type="image" src="/whatever.gif"> will also work and doesn't require CSS (not that CSS is a bad thing, just that an image input is simpler).

Replies are listed 'Best First'.
Re: Re: Re: POST from a hyperlink
by dragonchild (Archbishop) on Apr 25, 2004 at 20:41 UTC
    It also won't submit the form as written. Using anything other than an input of type "submit" will not submit a form without some form of client-side scripting, usually JavaScript.

    As for CSS, using CSS provides a lot more, and should be recommended in general.

    ------
    We are the carpenters and bricklayers of the Information Age.

    Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose

      Good to be aware of that. JavaScript isn't something I want to enclude a lot of so its good to know these form's limitations.
      I generally use CSS and find it very handy. I'm glad there is a way to apply button images in both HTML and CSS. Thanks for your input. Joe
      A reply falls below the community's threshold of quality. You may see it by logging in.
Re: POST from a hyperlink
by b10m (Vicar) on Apr 25, 2004 at 20:46 UTC

    It might be simpler, but maybe I'm using a terrible old and slow modem and on top of that, it takes too many hops to reach your server. In that case, I can switch off CSS and get the default submit button, instead of downloading your whatever.gif, what should be a whatever.jpeg or whatever.png to begin with ;-)

    And another nice advantage of the CSS approach is that maybe in a month time you like to restyle your website and you have a new whatever image. The bad thing is that you were cheap and chose a webhosting company that only allows you to use FTP (yeah, they are out there ;-) Now you need to download all the files that contain the reference to this image, change them and upload them again. With the CSS approach, you simple alter the CSS file and upload that one.

    --
    b10m

    All code is usually tested, but rarely trusted.
      That's interesting. I never really thought of CSS as a layer that you could shut off for slower connections. I should try that at home sometime with my modem. Thanks for your input. Joe
Re: Re: Re: POST from a hyperlink
by JoeJaz (Monk) on Apr 25, 2004 at 20:56 UTC
    That's a good shortcut. Seems easy to implement. Thanks for the tip. Joe