By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,677 Members | 1,645 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,677 IT Pros & Developers. It's quick & easy.

Creating buttons which disappear after submitting

P: 1
Hi! I want to make a simple website (for college project) which will let patients choose their time of appointment. I have trouble making buttons (with time written on them) which will disappear after patient clicks "submit".
All patients are logged in with unique usernames and passwords so when they click submit and someone else logs in to choose their time, they won't see any of the buttons that are submitted before.
If you have a link that can help me solve this, please post it or send me a part of code which makes buttons disappear after clicking submit button so no one else can see it.
I'm a JS beginner so I find this a bit confusing. Thank you!
Aug 26 '19 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 5K+
P: 5,389
to make a html-element disappear you can either use css or remove the element from the DOM at all. what did you have tried so far?

another question is - how is the submit exactly done - because you probably only want to remove the nodes when the time was booked correctly? and another thing is that for example 2 users logged in simultaneously - 1st one books a time and how would the 2nd one be notified about that? Without something like websockets or such you couldn't broadcast the information to other clients in realtime - so the 2nd user would submit and would receive a message that he was to late here and need to chose another time - so after the submit the request should return with all booked and free times - so the UI can adapt to it.
Aug 26 '19 #2

Post your reply

Sign in to post your reply or Sign up for a free account.