![]() |
|
|
|
#1 |
|
Hi,
I know I can either use a button or an image to 'submit' a form, but I would rather use a link. The "INPUT TYPE=SUBMIT" does not fit my new style and "INPUT TYPE=IMAGE" does not allow me to add text. Would there be a way to read values from a form using a <a ... >Some Text</a> I know it can be done using JavaScript but I would rather stick to plain HTML. Regards Simon simon |
|
|
|
|
#2 |
|
Posts: n/a
|
"simon" <> wrote
> I know I can either use a button or an image to 'submit' a form, but I would > rather use a link. Er, why. > The "INPUT TYPE=SUBMIT" does not fit my new style Ah, I see, well then your new "style" is broken. It does not conform to all the other billions of forms out there and might just confuse your users. Where is the URL to this form? > Would there be a way to read values from a form using a <a ... >Some > Text</a> Yes, using JavaScript but that makes your "form" unusable in the wild. > I know it can be done using JavaScript but I would rather stick to plain > HTML. Can't be done. Forms are submitted with an input type="submit" element. Full stop. |
|
|
|
#3 |
|
Posts: n/a
|
simon wrote:
> I know I can either use a button or an image to 'submit' a form, but I would > rather use a link. You may be able to style a button to visually look like a link in some browsers: <http://216.114.129.83:8080/~leif/disguises/>. But don't. |
|
|
|
#4 |
|
Posts: n/a
|
"rf" <rf@.invalid> wrote:
>> I know I can either use a button or an image to 'submit' a form, but I >> would rather use a link. > > Er, why. We seldom see people's answers to such questions, but my guess is that it's really a matter of Universal Symmetry. Once you have taken great trouble in preventing links from looking and behaving like links, typically making them look like buttons of a kind, you just _have_ to perform the opposite operation to buttons, don't you? -- Yucca, http://www.cs.tut.fi/~jkorpela/ Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html |
|
|
|
#5 |
|
Posts: n/a
|
> "simon" <> wrote
> >> I know I can either use a button or an image to 'submit' a form, but I > would >> rather use a link. > > Er, why. er, to be different I guess, > >> The "INPUT TYPE=SUBMIT" does not fit my new style > > Ah, I see, well then your new "style" is broken. It does not conform to > all > the other billions of forms out there and might just confuse your users. no, my style is not broken, what I meant was that a button would look ugly and I just thought that a link would look better. that's what I was trying to say about the style, (not css style). > >> Would there be a way to read values from a form using a <a ... >Some >> Text</a> > > Yes, using JavaScript but that makes your "form" unusable in the wild. That's what I said, read below. > >> I know it can be done using JavaScript but I would rather stick to plain >> HTML. > > Can't be done. Forms are submitted with an input type="submit" element. > Full > stop. > What I was trying to do was a list of, say, 5 items, (in a table), and the user would 'check' 1 item that they wish to work with. My links would be something like "Edit" and "Delete", I just thought that a link above the table would look better than a button would. Simon |
|
|
|
#6 |
|
Posts: n/a
|
"simon" <> wrote
> > "simon" <> wrote > > > >> I know I can either use a button or an image to 'submit' a form, but I > > would > >> rather use a link. > > > > Er, why. > > er, to be different I guess, To break your page perhaps? Go to http://www.google.com/ Now, would you fill in the <input type="text"> field on the form and then press one of the links to get your search results? No. You would press one of the *buttons* that are part of the form. To insist that a user activate a link to submit a form is not the correct paradigm. > What I was trying to do was a list of, say, 5 items, (in a table), and the > user would 'check' 1 item that they wish to work with. > My links would be something like "Edit" and "Delete", I just thought that a > link above the table would look better than a button would. Ah, more information You mean like happens in phpMyAdmin. Check a record (in the database) and click something that does something with that record. Have a look at phpMyAdmin. If you can't get to one then have a look here: http://users.bigpond.net.au/rf/temp/php/php.html (this is *not* my code, it is lifted directly from myPhpAdmin. None of the links "work" but you can look at the source.). They appear to use links to call into a server side process, passing all the required information (plus some) that would have been passed *if* the form had been submitted. In effect, they are bypassing the form entirely. Note, however, they are still using a paradigm that implies "form submission". These are not text links, they are "toolbar" icons that "look" like a selection of submit buttons. Note also that the bit you see of myPhpAdmin is a very small part of the whole. There are hundreds of PHP files up at the server driving everything. HTH |
|