Search the Community
Showing results for tags 'prompt'.
-
hey guys! i need help! i want to make the pages prompt an alert if the user tried to leave the page/textbox that he is currently editing. i want to make it like the facebook type, like if you type something in the post section of facebook then tried to leave or click the back button in the browser.. please help me guys.. can it be done by PHP or Javascript? please let me know and please help me! thanks guys! cheers..
- 1 reply
-
- leaving page
- javascript
-
(and 3 more)
Tagged with:
-
I'm not sure if this is the right place for this, but since php is sort of the hub I figure this might work. I'm struggling with finding the right way to snag a variable from a javascript prompt and pass that through to the server for a mysql query. I'm relatively new to all of this, so any help (even the obvious stuff) would be greatly appreciated. Here's my situation... I'm using a scheduling plugin on Wordpress that allows users to schedule an appointment with a service provider. Unfortunately, these appointments are for a set duration (e.g. 30 minutes). I'd like to allow the user to select their start time and then set their own duration. The plugin uses jQuery to display a calendar in table format and the user can click on a date/time that works for them. Then a new <div> appears on the page to confirm the appointment. I would basically like to insert a javascript prompt when the user clicks on their starting time that asks for the duration in hours. I need to pass this value back to the server (using jQuery or Ajax I'm guessing?) so I can send a query to the database and check if this time conflicts with other appointments, then continue with the confirmation <div>. I've spent probably 2 or 3 hours searching Google and I'm simply not finding a way to do this. Seems like it should be straightforward, but the answer is eluding me.