NetTalk Central

Author Topic: Dropdown as multi-level tree  (Read 4695 times)

Niels Larsen

  • Sr. Member
  • ****
  • Posts: 431
    • View Profile
    • Email
Dropdown as multi-level tree
« on: June 03, 2013, 09:02:56 AM »
Hi.

For a long time I wanted to make a dropdown in a text field as a multi-level tree.
Now I have finally found the solution, but I need a little help to implement the script.
The plugin I would like to use can be found here: http://www.givainc.com/labs/mcdropdown_jquery_plugin.htm

I've tried to put the  function into a text field, but it does not work quite as described. Styles and scripts are loaded in the correct folders and with the right references.
On my form I have added the list and the script as XHTML, but it works only partially.
Is there someone who knows a little more about javascript than I do, who can help me?

Regards Niels

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Dropdown as multi-level tree
« Reply #1 on: June 04, 2013, 02:49:31 AM »
I guess you'd need to build an example showing what you have so far. It's hard to give advice (short of implementing from scratch) without seeing where you're up to.

cheers
Bruce

Niels Larsen

  • Sr. Member
  • ****
  • Posts: 431
    • View Profile
    • Email
Re: Dropdown as multi-level tree
« Reply #2 on: June 04, 2013, 04:25:11 AM »
Of course!

Here is an example.

[attachment deleted by admin]

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Dropdown as multi-level tree
« Reply #3 on: June 04, 2013, 06:47:31 AM »
thanks Niels. I'm really busy until at least the end of this week, so maybe someone else would like to chip in with a suggestion or 3...

cheers
Bruce

Niels Larsen

  • Sr. Member
  • ****
  • Posts: 431
    • View Profile
    • Email
Re: Dropdown as multi-level tree
« Reply #4 on: June 14, 2013, 12:54:40 PM »
Can you maybe help me in which direction I should go?

Niels Larsen

  • Sr. Member
  • ****
  • Posts: 431
    • View Profile
    • Email
Re: Dropdown as multi-level tree
« Reply #5 on: August 01, 2013, 06:10:53 AM »
Hi Bruce

It would be a great help if you could assist me in 2 minutes to help me out in the right direction.

Regards Niels Larsen

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Dropdown as multi-level tree
« Reply #6 on: August 01, 2013, 07:52:09 AM »
Hi Niels,

every plugin is different so these are the typical steps I go through when investigating a plugin that looks interesting;

step 1 - understanding the plugin, how it works, what it requires from the server and so on

First read the docs for the plugin.
Bring up a sample demo page with the plugin in it. save this html, and reduce it down to it's bare minimum.
Once you have the plugin working in a static page, and you understand what the plug needs then

step 2

add the .js file for the plug to the external scripts.
manually add embed code in appropriate places to get the plugin embedded onto a form, browse, source, menu or whatever.
In the case of a menu consider how the links are generated to support page mode, content mode and popup mode.

step 3

if the plugin requires async data from teh server (like say AutoComplete did) then that has to be handcoded into WebHandler.

step 4

if the plugin does any kind of "saving" then those calls have to be managed in WebHandler as well.

step 5

Once all the embed code is working, and I'm happy that it's compatible in as many modes as possible, then I create template code to generate the embed code, removing the embed code as I go.

Hopefully that takes you less than a couple minutes to read. Unfortunately it can take me half a day to do step 1, which is the longest, hardest step, so it's difficult for me to really assist more with that. Obviously the more complex the plugin, the more effort that step can take. Some plugins have taken days to get to grips with.

In many cases I've also found the quality of the plugin to be a bit spotty. So while I've certainly used plugs (the HTML uploader and Signature plugins spring to mind) I've also had to write quite a lot of JavaScript to make those "work right" in the variety of cases we support. For example I need ThemeRoller support in all the plugins and so on.

Cheers
Bruce