I was reading this article which is a tutorial on developing Firefox toolbars. It appears to use Javascript for the main code. Now I don't know much about Javascript at all, I've barely ever used it.
Is it possible to create a toolbar that would pass a username/password (of the user who is using the toolbar), and look up that user in the "users" table, make sure the password is correct, and then return a certain value "unread_message_count" to the toolbar? So that I could have a toolbar which shows a user's number of unread inbox messages.
Would this be possible, and if so, would it be easy to implement? How might I go about getting started on this?
Developing a FireFox toolbar (Javascript) to access MySQL?
Moderator: General Moderators
- Josh1billion
- Forum Contributor
- Posts: 316
- Joined: Tue Sep 11, 2007 3:25 pm
- Kieran Huggins
- DevNet Master
- Posts: 3635
- Joined: Wed Dec 06, 2006 4:14 pm
- Location: Toronto, Canada
- Contact:
- Josh1billion
- Forum Contributor
- Posts: 316
- Joined: Tue Sep 11, 2007 3:25 pm
I see. Do you have any pointers on which functions to use for Javascript access of MySQL? I think this would require Ajax but I'm not sure- and honestly I hardly know what Ajax is. 
edit:
A quick google for ajax mysql and I found this page: http://www.tizag.com/ajaxTutorial/ajax- ... tabase.php
Is this leading me in the right direction? By the sound of it, I would be using the red-fonted code found in that code snippet to get the information.. passing the username and password (that the user entered into the toolbar) into the ajax-example.php file as a query string.
Am I on the right track here?
edit:
A quick google for ajax mysql and I found this page: http://www.tizag.com/ajaxTutorial/ajax- ... tabase.php
Is this leading me in the right direction? By the sound of it, I would be using the red-fonted code found in that code snippet to get the information.. passing the username and password (that the user entered into the toolbar) into the ajax-example.php file as a query string.
Am I on the right track here?
- Kieran Huggins
- DevNet Master
- Posts: 3635
- Joined: Wed Dec 06, 2006 4:14 pm
- Location: Toronto, Canada
- Contact:
A good friend of mine is working on Jester (actually, he's giving a talk at The Ajax Experience in Boston this week).
I just found out what it was it the other day but it looks downright wicked, and, possibly what you're looking for.
I just found out what it was it the other day but it looks downright wicked, and, possibly what you're looking for.
- Josh1billion
- Forum Contributor
- Posts: 316
- Joined: Tue Sep 11, 2007 3:25 pm
- Kieran Huggins
- DevNet Master
- Posts: 3635
- Joined: Wed Dec 06, 2006 4:14 pm
- Location: Toronto, Canada
- Contact:
A data model represents a row in a table, as well as that row's relationships to other rows, as an object.
REST is a way of giving HTTP access to those models in a predictable way.
Jester is a Javascript tool to give you local (javascript) access to a remote data model that's represented in a RESTful way.
It's essentially the closest thing to having database access / ActiveResource directly in Javascript without a local DB server.
I fully encourage you to learn each of the above techniques as they're incredibly empowering in their own rights, and even more useful together!
REST is a way of giving HTTP access to those models in a predictable way.
Jester is a Javascript tool to give you local (javascript) access to a remote data model that's represented in a RESTful way.
It's essentially the closest thing to having database access / ActiveResource directly in Javascript without a local DB server.
I fully encourage you to learn each of the above techniques as they're incredibly empowering in their own rights, and even more useful together!
Last edited by Kieran Huggins on Tue Oct 23, 2007 9:29 pm, edited 1 time in total.
- Josh1billion
- Forum Contributor
- Posts: 316
- Joined: Tue Sep 11, 2007 3:25 pm