0
Welcome Guest! Login
0 items Join Now

[Javascript] Prototype Window Class

    • Stuff's Avatar
    • Stuff
    • Newbie
    • Posts: 3
    • Thanks: 0

    [Javascript] Prototype Window Class

    Posted 18 years 1 month ago
    • Hello,

      I came accros this website prototype-window.xilinus.com/ and i really like the javascripts the author offers. I tried to install the .js files into my joomla directory but with no luck. I use a template from RocketTheme. Should i post my HTML code here or the CSS to find a solution?
    • Dan L's Avatar
    • Dan L
    • Elite Rocketeer
    • Posts: 1453
    • Thanks: 0

    Re: [Javascript] Prototype Window Class

    Posted 18 years 1 month ago
    • Dan L's Avatar
    • Dan L
    • Elite Rocketeer
    • Posts: 1453
    • Thanks: 0

    Re: [Javascript] Prototype Window Class

    Posted 18 years 1 month ago
    • Pretty cool stuff...

      www.toolboxcreations.com/demos/joomla1011

      All you need to do is:

      1. Upload the scripts to a subfolder in your templates folder, I called it "js".
      2. Upload the CSS of your choice and the accompanying image folder(s) to your templates CSS folder (I copied default.css, mac_os_x.css and the mac_os_x image folder).
      3. Implement the links to the CSS and scripts in index.php in the templates folder:
      <script type="text/javascript" src="<?php echo $mosConfig_live_site;?>/templates/<?php echo $mainframe->getTemplate(); ?>/js/prototype.js"> </script>
      <script type="text/javascript" src="<?php echo $mosConfig_live_site;?>/templates/<?php echo $mainframe->getTemplate(); ?>/js/window.js"> </script>
      <link href="<?php echo $mosConfig_live_site;?>/templates/<?php echo $mainframe->getTemplate(); ?>/css/default.css" rel="stylesheet" type="text/css"/>
      <link href="<?php echo $mosConfig_live_site;?>/templates/<?php echo $mainframe->getTemplate(); ?>/css/mac_os_x.css" rel="stylesheet" type="text/css"/>

      ...this goes in the HEAD section. I just added below the normal references to the template CSS.

      4. Add the call into index.php:
      <script type="text/javascript">
      win = new Window({className: "mac_os_x", title: "Sample", width:200, height:150, destroyOnClose: true, recenterAuto:false}); win.getContent().update("<h1>Hello world !!</h1>"); win.showCenter();
      </script>

      See the examples on that website for more ideas. Nice find!
    • Toolbox Digital | Dribbble | Forrst
  • Re: [Javascript] Prototype Window Class

    Posted 18 years 1 month ago
    • How would you make it pop up on a button press or link?
    • www.ninjoomla.com - The Ninjoomla Open Source Extension Club
      Over 50 open source extensions and 100 videos to you build the site you want.
    • Stuff's Avatar
    • Stuff
    • Newbie
    • Posts: 3
    • Thanks: 0

    Re: [Javascript] Prototype Window Class

    Posted 18 years 1 month ago
    • From what i see Dan you made it work in your website. But i need to be more specific. When i create a new content in news section i want to put a link "Open link" lets say and it will pop up with the HTML given. is it possible?

Time to create page: 0.068 seconds