javascript - Staying on same page after the form is submitted and then process the form again -
I am integrating MarketO (third party marketing software) with a tool on our website.
is a form that calls verb after calling and form data is saved in Marco: I want to use the same form data to store it in the local database (MySQL) too. Even after sending the form data, I would like to load the same page and also store the data of this form locally. There is no way to perform the following actions: I use PHP and I am using plain javascript. Please advise. You can do this in your own scripts using an AJAX call, then submit the form. Can Market Marks Basically if you want to capture the data before sending it to a remote server for processing, you will first capture the data, then submit the form to the next processing and after that Allow to Here we capture the click of the form, then make sure to disable the button by adding a square to it. So that before the processing is done, users will not be allowed to click here. When this information is collected and sends to your PHP page, then it submits its code to the In this example, I take the value from the input that the property named will be set to Code> echo '& lt; Pre & gt; ', print_r ($ _ POST, true),' & lt; / pre & gt; '; This will give you an exhibit of the captured data.
$ _ POST )
action property.
first name , this value will be sent to my PHP script and because I have a I have chosen a type of
POST , I can see it in my form <
& lt; script type = "text / javascript" & gt; $ (Document) .ready (function () {$ ('formSubmitButton'). ('Click', function (e) {e.preventDefault (); if (! $ ('. FormSubmitButton'). HasClass ('( "Submit")) {// Disable form to stop merge clicks ('.psbsubmit button'). AddClass ('submit'); $ .ajax ('/ path / to / my / db / script ', {type: Val (), lastName: $ (' [name = "lastname"]). Val ()}}) (function (data) $ $ ('parent parent'). Submit (); // $ form ($ FormSubmitButton). RemoveClass ('Submit');})} Return false;})}}; & lt; / script & gt; < / Div>
Comments
Post a Comment