Form, submit from a link?

S

simon

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
 
R

rf

simon said:
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.
 
J

Jukka K. Korpela

rf said:

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?
 
S

simon

simon said:

er, to be different I guess,
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).
Yes, using JavaScript but that makes your "form" unusable in the wild.

That's what I said, read below.
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
 
R

rf

simon said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top