Welcome Guest, Not a member yet? Register   Sign In
Notifications in CI project
#1

[eluser]doubleplusgood[/eluser]
Hey there,

I'm working on a Dashboard for an online store. Logged in administrators will see a toolbar that will appear over all pages with links to various functions.

In this toolbar I have an icon to view orders. However, I want the icon to change colour when some new orders have arrived to notify the administrator to check the orders.

Obviously I would need some sort of status on each order as they come in, but i was wondering if anyone might have any pointers on how to do this? I'm assuming there would be some sort of ajax involved for this.

Thank you. Big Grin
#2

[eluser]richzilla[/eluser]
Assuming your icon would be an image, simply create two different images for your order button. Then simply set up an ajax function on a timer, to a function that checks if there are any orders to be processed.

Following this, your function can then alter the image reference if there are any affected orders.
#3

[eluser]doubleplusgood[/eluser]
Thanks ricardino. I was creating the toolbar with css classes to show the icons and thought about just changing the class if new orders have arrived.

Now to find an example ajax function like you mentioned. Big Grin




Theme © iAndrew 2016 - Forum software by © MyBB