Custom Submit buttons using Javascript

P

Poker Man

Hi,

I know how to do Sumbit buttons in Forms, and I know how to do custom
buttons in Javascript.

What I can't seem to find is how to do custom Submit buttons using
Javascript!

Anybody out there have any pagesthat might provide a clue?

Thanks.
 
L

Lee

Poker Man said:
Hi,

I know how to do Sumbit buttons in Forms, and I know how to do custom
buttons in Javascript.

What I can't seem to find is how to do custom Submit buttons using
Javascript!

What does it mean to "do custom Submit buttons using Javascript"?

If you're submitting a form, you should use an input of type="submit".
If you want to customize that button, use CSS. I don't see any role
for Javascript.
 
P

Poker Man

Well, with CSS I canload a backgrounf image, but thatimage doesn't move
or change along with the button whenit is pressed, so figured this is a
job for javascript...no?
 
D

Dr John Stockton

JRS: In article <[email protected]>, dated
Sat, 4 Feb 2006 11:46:36 remote, seen in Ed
Jay said:
In my style sheet, I define the class 'button' as:

.button {
padding: 1px;
font:10pt arial,sans-serif;font-weight:normal;
background: #fbebbf;
border:1px solid red;
}

Setting an absolute font size in pages intended for general access is
incompatible with Disability Access legislation in civilised countries.

Additionally, it handicaps those with normal sight but high-resolution
screens.
 
T

Thomas 'PointedEars' Lahn

Ignace said:
Poker said:
I know how to do Sumbit buttons in Forms, and I know how to do custom
buttons in Javascript.

What I can't seem to find is how to do custom Submit buttons using
Javascript!

Anybody out there have any pagesthat might provide a clue?
[...]

here is how I should do:

in the head:
function go() { document.form.submit()}

in the form:
no submit button but a simple link with onClick="go()";

And the button does not work without client-side script support, and it
is likely that the form could not be submitted then at all (or would you
provide for a second submit button?). The reasonable and competent
approach is of course to use the `submit' event of the `form' element
through its `onsubmit' event handler and use a standard submit button.
As it was explained numerous times before here.
Links accept more CSS properties than buttons.

That would not be a link which would be its major flaw.


PointedEars
 
P

Poker Man

Ed Jay wrote ...

Correct. Except what you have here is a "modified" submit button.
Different colors, etc.

Perhaps it is the way I asked it, but my goal here is to make my own
button, with my own graphics. One graphics for the button normal,
another for it with focus, and another for it when it is pressed. The
most CSS offers is to give the button a background image, which doesn't
even move when the button is pressed.

That's why I think what I need is a Javascript way to do forms.
 

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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top