/    Sign up×
Community /Pin to ProfileBookmark

Auto Submit

hi is there a way to hide a form in a page
and with the viewer viewing the page, the form will automatically be sent without him pushing a submit button?

the form has 2 fields
a subject
and a message

the subject will be already filled with a subject of my choice
and a message already filled with a message of my choice.

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@KorDec 02.2006 — Welcome to the Forum!

Why to do that? It is quite unfair regarding the user. As I user, I would definitely like to decide myself [I]if, why, how[/I] and [I]when[/I] to submit data to the server...
Copy linkTweet thisAlerts:
@coppocksDec 02.2006 — Yes this is possible. Just use AJAX to send a hidden "Subject" and "Message" to whatever app you have to recieve the form when the page loads... ie, onLoad.

You don't necessarily need a form on the page to do this though.
×

Success!

Help @genez 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 5.19,
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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

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

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...