Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9174283
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:43:35+00:00 2026-06-17T16:43:35+00:00

I have written a small example page that looks like this: <!DOCTYPE html> <html>

  • 0

I have written a small example page that looks like this:

<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <title>IGO&nbsp;&ndash;&nbsp;IRC Go</title>
        <link rel="stylesheet" type="text/css" href="igo.css" />
        <script type="text/javascript" src="igo.js"></script>
    </head>
    <body>
        <h1 onclick="makeCircle()">IGO&nbsp;&ndash;&nbsp;IRC Go</h1>
        <svg xmlns="http://www.w3.org/2000/svg" version="1.1" id="board" 
            width="4" height="4" viewBox="0 0 4 4">
        <!-- content will be generated by script -->
        </svg>
        <div id="foo"></div>
    </body>
</html>

Where the igo.js looks like this:

function makeCircle() {
    var circle = document.createElement("circle");
    var board = document.getElementById("board");
    circle.cx = 4;
    circle.cy = 4;
    circle.r  = 4;
    circle.fill = "lime";
    board.appendChild(circle);
}

The problem is: It does not work; the circle is not displayed. Can you help me?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T16:43:35+00:00Added an answer on June 17, 2026 at 4:43 pm

    Please look in to the following URL:
    http://blog.blazingcloud.net/2010/09/17/svg-scripting-with-javascript-part-1-simple-circle/

    You should use code like:

    var c2 = document.createElementNS("http://www.w3.org/2000/svg", "circle");
    c2.setAttribute("cx", "250");
    c2.setAttribute("cy", "100");
    c2.setAttribute("r", "60");
    c2.setAttribute("fill", "#996699");
    c2.setAttribute("stroke", "#AA99FF");
    c2.setAttribute("stroke-width", "7");
    mySvg.appendChild(c2);
    

    You are currently editing the DOM Object instead of an attribute used by the browser.

    Live example: http://jsfiddle.net/CJrrz/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been testing a small app I've written that basically does a http HEAD
I have written a small JSP page that contains a text box and a
I have written a small program just like hello the world , everything was
I have written a small chat app that uses mysql + php to facilitate
I have written a small app that puts my bluetooth in discoverable mode for
I have written a small makefile for a few simple C programs that compiles
Let say I have written a small program that reads file_A and file_B as
I have written a small game in 'c' that has 15 Levels. I am
I have written a small example C++ program, using boost::thread. Since it's 215 lines,
I have written a small application that needs to log in to a website

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.