We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14779
    • 256 Posts
    I’m trying to set up a site with rounded corners, using only javascript - no images or CSS.
    I found this site:

    http://www.curvycorners.net/index.php

    I tried implementing it with this code: (here is the whole template)
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <head>
    <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
    <link rel="stylesheet" type="text/css" href="assets/templates/Andreas01/style/andreas01.css" media="screen,projection" />
    <link rel="stylesheet" type="text/css" href="assets/templates/Andreas01/style/print.css" media="print" />
    <title>[(site_name)] | [*pagetitle*]</title>
    
    <script type="text/JavaScript" src="assets/js/rounded_corners_lite.inc.js"></script>
    <style>
    
    <script type="text/JavaScript">
    
      window.onload = function()
      {
          /*
          The new 'validTags' setting is optional and allows
          you to specify other HTML elements that curvyCorners
          can attempt to round.
    
          The value is comma separated list of html elements
          in lowercase.
    
          validTags: ["div", "form"]
    
          The above example would enable curvyCorners on FORM elements.
          */
          settings = {
              tl: { radius: 20 },
              tr: { radius: 20 },
              bl: { radius: 20 },
              br: { radius: 20 },
              antiAlias: true,
              autoPad: true,
              validTags: ["div"]
          }
    
          /*
          Usage:
    
          newCornersObj = new curvyCorners(settingsObj, classNameStr);
          newCornersObj = new curvyCorners(settingsObj, divObj1[, divObj2[, divObj3[, . . . [, divObjN]]]]);
          */
          var myBoxObject = new curvyCorners(settings, "round_corners");
          myBoxObject.applyCornersToAll();
      }
      
    </script>
    
    
    </head>
    <body>
    <div id="wrap" class="round_corners">
      <div id="header">
        <h1>[(site_name)]</h1>
        <p><strong>"I can see you fly. You are an angel with wings, high above the ground!"</strong><br />(traditional haiku poem)</p>
      </div> <!-- end header -->
      <img id="frontphoto" src="assets/templates/Andreas01/images/front.jpg" width="760" height="175" alt="" />
      <div id="avmenu"> <!-- left sidebar -->
      <div class="sideblock" id="sideMenu">
      <h2>Navigation</h2>
      [[DropMenuS?subdiv=`true`]]
      </div>    
      </div> <!-- end avmenu -->
      <div id="extras"> <!-- right sidebar -->
       <h3>More info:</h3>
        <p>This is the third column, which can be used in many different ways. For example, it can be used for comments, site news, external links, ads or for more navigation links. It is all up to you!</p>
        <h3>Version:</h3>
        <p>andreas01 v1.2</p>
      </div> <!-- end extras -->
      <div id="content">
        [*content*]
      </div> <!-- end content -->
      <div id="footer">
        {{footertext}}</div> <!-- end footer -->
    </div> <!-- end wrap -->
    </body>
    </html>
    
    


    Anyone know what I’m doing wrong?
    Here’s the site:
    www.mayonnaise-lovers.com
      PM me to find out how you can get a FREE ipad 2!
      • 7923
      • 4,213 Posts
      Is the site offline? I could only see a "coming soon" page.. Also, have you seen nifty corners cube? Don’t know how that compares to the above one..


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 14779
        • 256 Posts
        sorry, I had an index.HTML file in the root!

        I’ll look at the Nifty Corners, but I’d like to implement a javascript only solution.
        -Josh
          PM me to find out how you can get a FREE ipad 2!
          • 7923
          • 4,213 Posts
          Isn’t nifty corners cube javascript only solution? The problem with your current script is that the javascript file is not in assets/js/rounded_corners_lite.inc.js or atleast this url gives me forbidden error http://www.mayonnaise-lovers.com/assets/js/rounded_corners_lite.inc.js


            "He can have a lollipop any time he wants to. That's what it means to be a programmer."
            • 14779
            • 256 Posts
            Ahha! Permissions problem with the javascript files! fixed!
            Thanks Doze!
              PM me to find out how you can get a FREE ipad 2!