dca_steve Posted November 9, 2011 Share Posted November 9, 2011 Hi all - I have a PHP form which allows users to submit data multiple times - in other words then can submit multiple records into the database using the same form over and over again. So currently how it works is once they've entered data and hit submit, the form refreshes and all fields get emptied, allowing the user to again enter more info. My client wants some sort of confirmation that data has been entered. I originally thought a simple pop-up/alert box saying 'Your data has been successfully entered' would do the trick since the user could then click 'ok', closing the pop-up to go about entering more data. However I hear a lot of disagreement on using javascript pop-ups due to pop-up blockers, javascript being turned off, etc. What alternatives exist to notify the user that their data has been submitted, while also allowing them to then continue entering more data? Thx! Steve Quote Link to comment https://forums.phpfreaks.com/topic/250783-alternative-to-javascript-pop-up-box/ Share on other sites More sharing options...
KevinM1 Posted November 9, 2011 Share Posted November 9, 2011 What's stopping you from posting back to the same form and simply having a message display at the top for each successful submission? Quote Link to comment https://forums.phpfreaks.com/topic/250783-alternative-to-javascript-pop-up-box/#findComment-1286683 Share on other sites More sharing options...
dca_steve Posted November 9, 2011 Author Share Posted November 9, 2011 Thx Nightslyr for your quick reply. I'm not at all strong with PHP so I'm not exactly sure how to do that, is there an example somewhere? When does that message disappear....in other words, upon successful submittal, that 'message' displays.....at what point does it disappear....I guess in an ideal situation, a message displays, the user can get rid of the message, or it disappears somehow, then the user continues to enter in more data.....can it do that? Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/250783-alternative-to-javascript-pop-up-box/#findComment-1286687 Share on other sites More sharing options...
xyph Posted November 9, 2011 Share Posted November 9, 2011 Why does the message have to go away? Why can't it stay above the form until the user leaves the page, or submits another entry? It's hard to help you when you talk about using a form to manipulate a database, yet don't know how you output variables. One is much simpler than the other, and it's the one you're having issues with. Quote Link to comment https://forums.phpfreaks.com/topic/250783-alternative-to-javascript-pop-up-box/#findComment-1286690 Share on other sites More sharing options...
dca_steve Posted November 9, 2011 Author Share Posted November 9, 2011 I guess it doesn't have to go away, and I completely agree with what you say....but knowing my client they will then question the message once they've submitted the form again....they'll wonder if the message is relative to the data they just submitted, or if it is the same message from the first time they submitted. They'll say how do i know the data got submitted the second time since the message on the form never disappeared from the first time. I'm personally fine with it, but I know my client won't like it! Which brings me full circle back to were I was before, not sure of a solution where the user is given verification that data was submitted but then brought back to a clean form with no messages on it.... Quote Link to comment https://forums.phpfreaks.com/topic/250783-alternative-to-javascript-pop-up-box/#findComment-1286701 Share on other sites More sharing options...
xyph Posted November 9, 2011 Share Posted November 9, 2011 Then include some unique bit of data along with the message? "Data containing $someField has been entered successfully" or use something like mysql_insert_id to return the unique ID attached to the last insert. You could always use a JavaScript timer that removes the visibility of the span containing the message on completion? http://www.google.com/search?q=hide+element+after+seconds Quote Link to comment https://forums.phpfreaks.com/topic/250783-alternative-to-javascript-pop-up-box/#findComment-1286752 Share on other sites More sharing options...
dca_steve Posted November 9, 2011 Author Share Posted November 9, 2011 xyph - thanks, those are some good ideas. I'll look into it, that might just work! Quote Link to comment https://forums.phpfreaks.com/topic/250783-alternative-to-javascript-pop-up-box/#findComment-1286772 Share on other sites More sharing options...
xyph Posted November 9, 2011 Share Posted November 9, 2011 Letting the user know exactly what information was previously added is helpful in mass data entry. If the user minimizes the task for 5 minutes, they don't have to worry about forgetting what information was last added. Generally, if you know the previous entry added, you can figure out the next one. Quote Link to comment https://forums.phpfreaks.com/topic/250783-alternative-to-javascript-pop-up-box/#findComment-1286777 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.