I am using WordPress. My contact form plugin is "contact form 7". If your email fails or succeeds, it says sucessfull or not sucessful. I want to attach javascript to it and locate it in middle of my contact so if it fails box opens up says it failed and it disappears, samething for success. I also would like page to change to homepage if mail sent successfully.
If you want this only for the normal use of the form, and not for some fancy special feature - Contact form 7 already have this function .
The default message is (red box ) "Failed to send your message. Please try later or contact the administrator by another method."
you can change this message in the settings.
seems like this could be done pretty easily with jQuery, no? just look for the submit button to be clicked, validate, and then run your actions.
you could either use an alert, or have a hidden div on the page that you change to display:block, throw a timer on that to hide it (or a close button), and just set the html text to 'success' or 'fail' respectively. then when the div is set to close, and was successful, throw a url redirect.
i know that is pretty vague, but not sure of your level of expertise.
Related
I'm trying to track form completions on a page where the form's URL is the same as the confirmation page.
Form Page
Does anybody know if this can be done with Google Tag Manager/Google Analytics please?
Completion page
Simply tracking clicks of the Submit button will result in false positives because sometimes people will not type the security code correctly.
Is there a tracking code of some sort that can be added to the confirmation page, so that each time it loads the count goes up one?
I'm grateful of any help you can provide.
Thanks!
You can use the built-in visibility trigger - e.g. as soon as a link element with the link back to the homepage becomes visible you let the trigger fire. Specifics depend on the CSS id or class for that link (if any, else you'd have to test the click text).
In the visibility trigger you might have to enable "listen for DOM changes" if the confirmation message is loaded per Ajax (as opposed to just have their CSS display property set to 'none'.
Hi I am embedding a Google Forms in a website, through .
I want to add a callback function to the form, so that I can now that the user submitted it, and I can close the form window (or display a button to close it).
How to do it?
I have not found such a function in GDoc Form. I saw there is a script editor, but could not make it work for me, seems overkill.
I was adding a button to my html page that is always displayed atop of the form, but actually I would like it to appear only after the user completed the form.
--
Edited
Tried iFrame src change event detection?
but still I undergo
Uncaught DOMException: Blocked a frame with origin
I'm putting together a pretty basic InfoPath 2010 form that will be filled out in a browser (by non-logged in users) and will generate an email upon submission. The client that I building the site for would like a user to be able to check a box to mark whether they would like to have the email address that they provided be CC'd on the form submission.
I know how to CC the email upon submission, but I haven't found anything that talks about using a check box to control it. I have tried playing around with rules and submit button options, but couldn't get exactly what I wanted to stick.
What I need is: if a user checks a box, they will get CC'd upon submission, and if they leave the check box unchecked, then they receive no email.
Use the code behind of the InfoPath form to accomplish this. Get the XPath of the field associated with the checkbox in the Form_Submit method of the code behind. If the field returns true, go ahead and CC, otherwise, don't CC.
guys
now i knew how to send message without using facebook api,
i could use url to fill the message textarea in facebook's website
www.facebook.com/messages/[user_id]?msg_prefill=XXX
but here i'd like to know how to send this message automatically
in April, i found a way to click "send" button automatically (find "send" button in html text and click it),
but now facebook hide theses html text so that i can't find this button in html text.
Therefore, can anybody provide some ways or point to send message automatically.
thanks
Use the console in you browser (usually F12 to open) firefox console is the most powerfull, your console should have a command like "element inspection" or similar, use this tool to analize the button you want, read ing the code you should find someting like "on click" or simsimilar, after this you will find a java command to push the button. Anyway to do this kind of stuff without being a programmer,use selenium IDE, very easy,only for firefox,you must download it from firefox as add on. Good luck!
My site has a Send Message button next to the link to a users profile. When the user clicks on it (using the onClick handler) I want to open a Facebook-style message window, instead of a new window (window.open() method).
It doesn't have to be exactly the same as Facebook's, but I want a similar kind of thing.
Check out Jquery-UI. they have a lot of popuppable windows. Probably want to couple that with some Ajax, and bam, dynamic message popups.