-3

I have no formal training in web development and created my website entirely from studying the code from other sites and finding out things from the internet. So my query might be trivial for many of you established web developers. I've created this website: www.justnoktours.com which is a booking website for bicycle tours in Bangkok. It's very basic...clients read about the tour and then "book the tour" I now need them to first check a checkbox before the "Book this tour" button becomes clickable.

I've attached a picture (with the code) of where this needs to be and also what needs to happen.

If anyone can help me, I'd really appreciate if you could give me the exact code so that I can just cut and paste. website page

Alon Eitan
  • 11,997
  • 8
  • 49
  • 58
Roland
  • 1

1 Answers1

0

You can use following code:

    <label for="chkTermsAndConditions">
    <input name="chkTermsAndConditions" id="chkTermsAndConditions" type="checkbox" onchange="document.getElementById('btnBookTour').disabled = !this.checked;" />
    I have read and agree to the Booking conditions
</label>
<input type="button" name="btnBookTour" disabled id="btnBookTour" value="Book this tour" />
Saurabh
  • 1
  • 2
  • Thank you for taking the time to help me.... I really appreciate it. I'll try your suggestion – Roland Nov 02 '17 at 06:25
  • Just want to say thanks again.... your code is just what I was looking for and it worked perfectly. I am not a developer at all, so I really appreciate your help. – Roland Nov 03 '17 at 09:12
  • Thanks for appreciation Roland – Saurabh Nov 03 '17 at 10:22