rudyten Posted April 2, 2012 Share Posted April 2, 2012 Am just wondering what the standards are or what people think. I tend to display a Success/fail message after every update to the database. My messages tend to be very detailed. instead of just "record failed". it will say "telephone added ok", "customer information updated". Maybe am going message happy, Same thing goes to confirmation messages, specially on deletes. my other issue is where to display the messages, I tend to push the page content down 2 lines to make room for the messages, Should I use a pop up instead? thanks:) Quote Link to comment https://forums.phpfreaks.com/topic/260171-to-or-not-to-display-messages-on-updates-confirmation-etc/ Share on other sites More sharing options...
Adam Posted April 2, 2012 Share Posted April 2, 2012 There are no standards on how to display errors, it's really just a design consideration. It's best to keep it consistent across the site though, and easily noticeable from the start. The other day I had to contact the council tax office, so sent them an email through their site, and was about to close the tab before I noticed a small one line error hidden amongst a bunch of other text kind of implying the message had been sent, saying "Your session has expired". I don't know if the email was sent or what? Completely ruined my experience of their site, simply because they didn't highlight the error message or give any clear explanation of what had happened. The messages themselves, in my opinion, should be lightly detailed so the user understands what didn't work, but don't contain any confusing terminology or expose the server side implementation (like a MySQL error). Just keep it simple and short, but informative. Quote Link to comment https://forums.phpfreaks.com/topic/260171-to-or-not-to-display-messages-on-updates-confirmation-etc/#findComment-1333490 Share on other sites More sharing options...
Philip Posted April 2, 2012 Share Posted April 2, 2012 The messages themselves, in my opinion, should be lightly detailed so the user understands what didn't work, but don't contain any confusing terminology or expose the server side implementation (like a MySQL error). Just keep it simple and short, but informative. Agreed. If you need to add in more technical information, create error codes (e.g. ERR-DB1004 for something like "Lost connectivity to the database") - that way you know what it is without overloading the user with [to them] meaningless information. Quote Link to comment https://forums.phpfreaks.com/topic/260171-to-or-not-to-display-messages-on-updates-confirmation-etc/#findComment-1333579 Share on other sites More sharing options...
scootstah Posted April 3, 2012 Share Posted April 3, 2012 I usually use an unobtrusive fixed-positioned bar at the top of the page that's maybe 50 pixels tall or something for my success messages. I usually run a bit of Javascript to make it disappear after a few seconds, as well as a close button. After say an admin uses the site enough times, adds new content, etc, they're not going to want to see some big annoying success message in the way. They're not going to want to close a bunch of popups every time they make a small adjustment either. The way I do it makes it up out of the way and it disappears by itself. As far as errors, it really depends what kind of error we are talking about. Form validation? Those go back to the form by their respective inputs. If it is some kind of error that should never happen I'll probably log it and throw a HTTP 500 response. An example would be trying to use data that should never be missing, but is - this would probably be a result of someone messing with hidden form data or something, something that just wouldn't happen naturally. Quote Link to comment https://forums.phpfreaks.com/topic/260171-to-or-not-to-display-messages-on-updates-confirmation-etc/#findComment-1333924 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.