- Create Account

Supernote - load data from database ?

Forums > "Miscellaneous" Scripts > Supernote - load data from database ?
Author
Message

1) Eminos Group: Members
Posts: 2 Joined: 9 Aug 2006 Location: IP: 83.226.--.--
Hi,

First of all I have to say that this is the BEST "little" collection of cool scripts I've seen on the web! Really good scripts, IMO. I'm going to use some of them on my site.

Anyway, what I'm trying to do is to use Supernote as a "popup menu". The code structure is great, and it's easy to work with the divs.
The thing that I want to do is to load data from a database into Supernote divs.
Right now I have a table on my site, that lists some radio stations, the data is from MySQL. When the user clicks on a radio station link, the Supernote (menu) should show up with "Play radio station, More Info, Rate station" (links) and so on...
All these links in the Supernote menu, must of course be associated with the right radio station.
So, the question is, How do I do that ? :D

Please  take a look at the radio station table here, so you know what I'm talking about:
www.bihinternet.com

Greatful  for help...

/Eminos

2) Angus Turnbull Group: Moderators
Posts: 4042 Joined: 7 Dec 2003 Location: New Zealand IP: 192.188.--.--
I'm glad you like the scripts :).

You  can do what you describe by generating the right HTML. I would assign each radio station an unique identification code/number (perhaps you already have one in your DB?) and just generate the note <div> with the same code as the inline link to the radio station. It might be helpful to add to an array of notes as you encounter items, then dump all the notes out at the end.

Good luck - Angus.

3) Eminos Group: Members
Posts: 2 Joined: 9 Aug 2006 Location: IP: 83.226.--.--
Ok, cool. I've figured it out, thanks man...

I have one problem though. I get javascript errors, and I can't get the supernote to show up. "Error:'SuperNote' is undefined" .. I use Mambo, and I have one index.php (template) and several other files (modules, with no head and body) that are in the index.php body. And no matter where I put the different supernote code, I always get more or less errors. Take a look at www.bihinternet.com/mambo ...

/Eminos

4) Angus Turnbull Group: Moderators
Posts: 4042 Joined: 7 Dec 2003 Location: New Zealand IP: 155.205.--.--
On the page you have A CLASS elements triggering notes, but the note data itself is missing.

You need the JS and CSS files alongside both triggers and notes to have the script work. If you are getting "not defined" errors, ensure that the files are uploaded and included correctly.

Good luck - Angus.

Post a Reply:

You are not logged in, and will be posting anonymously as a guest. If you want to post using an account, please login at the top of this page.