Suoritettu

Javascript submit button with disable option, we'd like to add a reset option

Hi,

We would like to amend a form submit button that we have. At the moment, when someone submits the form we disable the submit button.

We would like to keep this option, but then change the text on the button from 'Process orders' to 'Orders submitted'.

We would also like a second button next to the submit button called 'Reset option', clicking this would enable the submit button again and change the text again from 'Orders submitted' back to 'Process orders'. Then allow the user to be able to submit the form again.

It is similar to the second example on this webpage tutorial ( titled 2. More User-Friendly):

[login to view URL]

Our current code looks like this:

<form>

//

// form body here

//

<button type="submit" class="btn btn-primary" id="btn-process">Process orders</button>

</form>

<script>

// When they submit the form, we submit an AJAX request after disabling the button

$('#btn-process').on('click', function(e) {

if( confirm('Are you sure you wish to process the selected orders? Press OK to proceed.') )

{

e.$this.disabled=true;this.value='Sending, please wait...';setTimeout(() => { this.disabled=false; [login to view URL] = 'submit' },3000);[login to view URL]();

$(this).attr('disabled', true);

//

// more script to send off form fields

//

</script>

We would like some documented code that we could try out our side and check as not accessible from outside the company.

Many thanks

Bob

Taidot: JavaScript, HTML

Tietoa asiakkaasta:
( 8 arvostelua ) Barnstaple, United Kingdom

Projektin tunnus: #33779782

Myönnetty käyttäjälle:

polushkodevf

Hi, there. I am a web engineer with 5+ years of experience in web and cross-platform development. Especially, I have vast experience in HTML, JavaScript. PHP, Python, Javascript, Typescript, Liquid, Java, Rust, Solidi Lisää

£15 GBP 1 päivässä
(0 Arvostelua)
0.0

30 freelanceria on tarjonnut keskimäärin £24 tähän työhön

erranjit28111989

Hello May i add this Reset button via JS right away ? A pro coder -- Ranjit..............................

£28 GBP 1 päivässä
(309 arvostelua)
7.2
shailendra041090

Hi there, - My name is Shail. I’ve read your brief and chcked your attached code, understand your requirement, I can easily do this job. I can implement the functionality to change text on the button from 'Process o Lisää

£10 GBP 1 päivässä
(179 arvostelua)
7.1
samair0

hello , hope you are fine i have very good grip in ajax i can work for you on this , lets discuss that is my portfolio you can check https://www.freelancer.com/u/samair0

£40 GBP 1 päivässä
(531 arvostelua)
7.0
indiainfosoft

Hi Bob, I can do this job (javascript button job) . I have 18+ years of experience in website development . Get in touch with me for quick solutions. thanks

£20 GBP 1 päivässä
(170 arvostelua)
6.4
abubakar12345678

I will change button names on clicking with reset functionality surely asap. Give me chance to show you good result. Thanks........

£10 GBP 1 päivässä
(85 arvostelua)
6.0
sandeepohri1

Hello, I can add RESET option in form. Message me so that we can discuss more and then I will start working IMMEDIATELY. Thank you.

£20 GBP 1 päivässä
(119 arvostelua)
5.8
dmitiykokolo

Hello, I have read the job description and it seems like you are looking for a developer who is fluent in JavaScript. I have an immense background in JavaScript and its ecosystem since I have finished my course of lea Lisää

£20 GBP 1 päivässä
(22 arvostelua)
5.5
rizwange4

Hi There I Just read your project detail regarding the Javascript submit button with disable option, we'd like to add a reset option Can we do a quick chat right now so that we can discuss the project briefly? I have Lisää

£15 GBP 1 päivässä
(111 arvostelua)
5.9
maverickindia

Hello I have read your requirements carefully and got a total understanding of the project .kindly discuss your project in detail with me. No fake commitment,100% quality work. I have more than 9 years of experience Lisää

£50 GBP 7 päivässä
(48 arvostelua)
5.1
hridoymiu2017

Hi, I have read the description of your project. I confirm you that I can do it in few minutes. I have done 200+ simillar type of tasks till now. If you hire me now, I can complete it immediately and then show you to a Lisää

£15 GBP 1 päivässä
(44 arvostelua)
4.8
designoxyll22

Good day, your post caught my eyes, and interested in working with you. Can start today! I’m a perfect fit for the job as I have expertise in HTML/CSS/JAVASCRIPT, etc. I have done some mind-blowing projects. You can Lisää

£15 GBP 7 päivässä
(21 arvostelua)
5.3
giaphung2k1

Xin chào I checked "[login to view URL]" carefully and I am absolutely sure that I can execute the project very well. I am very interested in this project as it matches my skills. Lisää

£15 GBP 7 päivässä
(36 arvostelua)
4.4
SaraHaider01

Javascript submit button with disable option, we'd like to add a reset option (Project doable. Message me for discussion) I specialize in Wordpress, Html, Node, Laravel, Shopify, Python, JAVA, PHP, and react. I can us Lisää

£150 GBP 1 päivässä
(8 arvostelua)
4.4
sabribaccar71

Hello , I have seen your job requirements and I am sure that I can do your task efficiently in less timeline as we are a team of engineers of 3 people, each one has an experience of 5+ years we are specialized in web d Lisää

£15 GBP 1 päivässä
(5 arvostelua)
3.4
klyevetskyie

Hi, Bob. I can do it. no problem. Already I am very strong at javascript, Look forward to working with you on this projec.t Thanks.

£50 GBP 1 päivässä
(2 arvostelua)
3.0
aliAdelElroby

Hello there, I can help you we can start NOW! I'm a front end developer I have +2 years of experience You can see my portfolio from here. https://www.freelancer.com/u/aliAdelElroby I hope to deal with you, Goodluck.

£15 GBP 1 päivässä
(6 arvostelua)
3.1
lmhunhthanh91

I have more than 8 years of experience working with PHP, Prestashop, CodeIgniter, Laravel, Yii2, MySQL, PostgreSQL, API, HTML, Javascript, Node Js, Vue Js Css, Git, C#, Selenium, Puppeteer, TLV, QR Code, BarCode, SQL S Lisää

£20 GBP 1 päivässä
(9 arvostelua)
2.9
vineetagrawalggc

Hi Bob, I will do this job quickly, need only your confirmation. Let's connect for more discussion. Thanks Amit

£12 GBP 7 päivässä
(4 arvostelua)
3.1
bogdanmil

Hello, there. I just read your posting. It sounds like you need an expert in web developer to help you with HTML | JS. As you can see on my reviews, I have a good background in this. I can start to work right now and Lisää

£20 GBP 1 päivässä
(3 arvostelua)
2.1
umakant171991

Hello sir My name is Umakant Yadav I will start work just now. I have 3 years' experience in core PHP, CodeIgniter and WordPress, webhosting, MySQL, Shopify, Presta shop SSL installation , DNS html5 Using jQuery , Aja Lisää

£15 GBP 2 päivässä
(2 arvostelua)
1.9