/    Sign up×
Community /Pin to ProfileBookmark

onSubmit write text

Hey, on my website im currently using a form where a user submits their E-mail and Name and they get put on my subscription list.
When the user clicks submit, there really is no notification telling them that it worked successfully.

What I’m trying to do is when the user clicks submit, text appears right above the form saying “You have successfully subscribed to {list name}.”
I do not want this to be a popup. Any idea on how to do this?

to post a comment
JavaScript

5 Comments(s)

Copy linkTweet thisAlerts:
@vishnukumargrOct 25.2010 — Try using AJAX
Copy linkTweet thisAlerts:
@FangOct 25.2010 — A "successfully" subscription can only be validated using server-side scripting.

Just poping up a message is possible with JavaScript, but it can in no way be described as a "successfully" subscription.
Copy linkTweet thisAlerts:
@mmartinOct 25.2010 — Hey, on my website im currently using a form where a user submits their E-mail and Name and they get put on my subscription list.

When the user clicks submit, there really is no notification telling them that it worked successfully.

What I'm trying to do is when the user clicks submit, text appears right above the form saying "You have successfully subscribed to {list name}."

I do not want this to be a popup. Any idea on how to do this?[/QUOTE]


You can always put a label above to display the information you want.
Copy linkTweet thisAlerts:
@cbVisionOct 25.2010 — As vishnukumargr and Fang both referenced, you'll want to use server side scripting mixed with AJAX. I'd guess your server language is PHP, so I'd recommend doing some googling for "php ajax form" and read through some tutorials.
Copy linkTweet thisAlerts:
@HavensauthorOct 25.2010 — Well the problem isn't so much checking whether or not it was successful, im using the subscription company 'aweber' to do all that. all i need is some text saying "Thank you for subscribing to the newsletter." to appear after they click submit. because right now they click submit and it just redirects them back to the page.
×

Success!

Help @Havens 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.27,
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,
)...