Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

want help in cpanel 11 javascript - could anyone assist

Discussion in 'General Discussion' started by flexiweb, Apr 1, 2008.

  1. flexiweb

    flexiweb Registered

    Apr 1, 2008
    Likes Received:
    Trophy Points:
    hello to all,

    ive been looking all over the net fot hours on end after a drag and drop / rearrange box type javascript like the one featured in cpanel 11 / x. ive tried copying it straight from the page itself but its no use.

    if anyone knows the script or has it or even knows where i can get a similer script it would be very appreciated.


  2. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Apr 7, 2006
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    It's built on the Yahoo User Interface Javascript library. Try searching for that, or YUI.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Nov 29, 2006
    Likes Received:
    Trophy Points:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Well this is a two-pronged issue.

    Actually doing the drag and drop is fairly easy. It's just a matter of calling some YUI code and having the correct CSS. Here's a code sample I'm using at my presentation at this year's cPanel Conference on this topic (attached screenshot)

    The problem comes with storing the order. As you can see, there is no API2 code in the code sample so the APIs have no way of knowing this box exists. Additionally, since this is outside the API2 code block that inserts the feature boxes in proper order, this box will always be at the top (or the bottom, depending on your code placement) when the page is loaded/refreshed. There may be a way around this issue, however I have not dedicated time to this yet.

    Attached Files:


Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice