Results 1 to 6 of 6

Thread: Real time jQuery notifications from a form?

  1. #1
    Join Date
    Mar 2013
    Posts
    10
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default Real time jQuery notifications from a form?

    Hi,

    I was wondering if it was possible, and if so, how I'd go about implementing this notification plugin so that i can send notifications to my users via a form which is inside my admin panel.

    Thanks
    Last edited by xiphoid; 03-09-2013 at 10:22 AM.

  2. #2
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    1,940
    Thanks
    16
    Thanked 304 Times in 303 Posts
    Blog Entries
    11

    Default

    If you go to the demo and view the source code, you can see how to setup/configure the message in the head section of the web page, and then further down you can see how its called;
    Code:
    javascript:showSuccessToast();
    You can attach the call to anything you like. So download the zip and install it by following the examples in the demo and also refer to the documentation on the wiki: https://github.com/akquinet/jquery-t...ge-plugin/wiki

    I'm not sure what you mean when you say that you want to send notifications to users via a form though.

    If you mean that you want to send an email notification to their email inbox, this plugin can't do that (you'd need to use a server-side language such as php, rather than this which is client-side JavaScript)

    If you just mean that you want to display a notification to a user (within the web page) while they use a particular form, this plugin can offer on-page feedback - maybe to say that something is loading or that a form is being submitted - you could attach a javascript call to a submit button. But even with the convenience if this javascript notifier, its still a good idea to display server-side feedback via php to confirm when an action has actually happened.

    If you need more help, please provide a link to your page with the toast message scripts installed, and also give a clearer description of what you're having issues with and what you're trying to achieve.
    Focus on Function Web Design | Latest News RSS | Facebook | Twitter |
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps |
    The only limit to creativity is imagination: JemCon.org

  3. #3
    Join Date
    Mar 2013
    Posts
    10
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default

    Thanks for the reply Beverley. What I basically want to do is have a form in an admin panel which the admin can enter a message and then click "submit" which would show the notification to all online users, for example if I wanted to alert all my online users of an important message I could enter the message in the form and submit it, resulting in it showing the notification to all the online users without a page reload, if that makes sense :P

    Thanks
    Last edited by xiphoid; 03-09-2013 at 01:11 PM.

  4. #4
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    1,940
    Thanks
    16
    Thanked 304 Times in 303 Posts
    Blog Entries
    11

    Default

    Ok - so how does your admin panel currently store the message? (Database? flat file?)

    Are you just looking for help on how to pass an existing message variable to the toast popups?
    Focus on Function Web Design | Latest News RSS | Facebook | Twitter |
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps |
    The only limit to creativity is imagination: JemCon.org

  5. #5
    Join Date
    Mar 2013
    Posts
    10
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default

    What I would be doing is storing the message in the database after it has been submitted. I know how to do that but I'm unsure of how I could get the message to show to all users without the need of a page reload.

    Thanks very much

  6. #6
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    1,940
    Thanks
    16
    Thanked 304 Times in 303 Posts
    Blog Entries
    11

    Default

    There's a method here using jQuery and AJAX that looks like it could work: http://stackoverflow.com/questions/8...mysql-database

    I'm guessing that at the part of the function where it says;
    Code:
    if (results) { /* fade into dom */ }
    you could place the call to a toast popup message.
    Focus on Function Web Design | Latest News RSS | Facebook | Twitter |
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps |
    The only limit to creativity is imagination: JemCon.org

Similar Threads

  1. Real-Time notification pop ups?
    By mingalls in forum Looking for such a script or service
    Replies: 2
    Last Post: 02-02-2009, 07:44 PM
  2. Replies: 3
    Last Post: 11-12-2008, 06:18 PM
  3. Real time hit counter
    By kwahamot in forum Flash
    Replies: 6
    Last Post: 01-16-2008, 01:50 AM
  4. Form Submssion in somewhat real-time
    By darkus in forum Looking for such a script or service
    Replies: 6
    Last Post: 12-15-2007, 07:19 PM
  5. real-time cooking with javascript
    By VatsaL in forum The lounge
    Replies: 1
    Last Post: 01-26-2007, 05:09 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •