/    Sign up×
Community /Pin to ProfileBookmark

is it possible to submit a form without button

hi
is it possible to submit a form without clicking a submit button?

best regards
chris

to post a comment
JavaScript

6 Comments(s)

Copy linkTweet thisAlerts:
@gnaneshMay 09.2003 — yes..you can


capture the enter key code and call the function which you need to search

this is what you need to include in your <body> tag for ENTER key

<body onkeypress="if(event.keyCode=='13'){search();}" )

this will call your search function when the user clicks on the ENTER key

i.e. user can hit "ENTER" key after entering some data in to the search field

thanks

gnanesh
Copy linkTweet thisAlerts:
@ravMay 09.2003 — You can also use document.formname.submit()

or something like it.
Copy linkTweet thisAlerts:
@gnaneshMay 09.2003 — hi rav

Please read " loonaticmedia " question:-

he says is it possible to submit a button without clicking submit button!!

thanks

gnanesh
Copy linkTweet thisAlerts:
@ravMay 09.2003 — .Submit() is a command.. not a button...

You can call the command from some JS function to submit the form.

So, this doesn't require you to click a button.
Copy linkTweet thisAlerts:
@CharlesMay 09.2003 — [font=georgia]There are a few things of which you need to be careful when you use it. See http://forums.webdeveloper.com/showthread.php?s=&threadid=9349.[/font]
Copy linkTweet thisAlerts:
@brendandonhueMay 09.2003 — You can also use an image to submit a form.

<input type="image" src="submit.gif">
×

Success!

Help @loonaticmedia spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...