473,387 Members | 1,700 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

createElementNS on IE...

Hi All

document.createElementNS works fine on firefox, but not on IE.

I use this fuction to create SVG objects on the fly

for example.....

SVG.ns = "http://www.w3.org/2000/svg";
var svg = document.createElementNS(SVG.ns, "svg:svg");

Some of the forums suggested to use document.createElement insteaad of document.createElementNS on IE......

But I want to create an elemnt from the name space which is present in "http://www.w3.org/2000/svg"


how do i do that in IE.

Thanks
Prasanna
May 3 '07 #1
4 9051
acoder
16,027 Expert Mod 8TB
See this thread
May 3 '07 #2
Hi

I read the thread and it points to one more thread

http://simonwillison.net/2003/Jun/15/javascriptWithXML/

where it says replace all occurences of createElementNS with createElement.

But my if i say
document.createElement("svg:svg");
thing may not work, since svg:svg is present in the http://www.w3.org/2000/svg namespace, how do i specify that ?

Thanks
Prasanna
May 4 '07 #3
acoder
16,027 Expert Mod 8TB
Have you read the last comment on that page? IE doesn't understand name spaces because everything is rendered as HTML, not XHTML.
May 4 '07 #4
Have you read the last comment on that page? IE doesn't understand name spaces because everything is rendered as HTML, not XHTML.
Ya I agree!!!!!
But somthing like this may not work..

document.createElement("svg:svg");

Is there an alternative for this ?
May 7 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: flamesrock | last post by:
Hi, I'm working on creating an xml structure like the following, as effiecienty and elegantly as possible using minidom preferably: #<region> # <population> # <total> # ...
0
by: Nicolas VanOrton | last post by:
Hi all, When XercesDOMParser parses an XML document in a file, if a Schema is attached, it automatically adds all attributes with default values to the corresponding nodes... I'm trying to...
36
by: Wilfredo Sánchez Vega | last post by:
I'm having some issues around namespace handling with XML: >>> document = xml.dom.minidom.Document() >>> element = document.createElementNS("DAV:", "href") >>> document.appendChild(element)...
3
by: BakedBean | last post by:
Hi, This is probably really simple, but I've only just been asked to look at this and I've spent a full day trying to get it to work, so any help will be very gratefully received! At present...
9
by: VK | last post by:
if ((window)&&(window.netscape)&&(window.netscape.security)) { // OK, this is Gecko/Firefox or someone mimicing it so well // that there is no way to catch it on the act. } But I need Firefox...
2
by: DarkBlue | last post by:
I am trying to port a Delphi database application to python on linux with a firebird database backend and I am using pythoncard to recreate the gui. I will have about 25 delphi forms to be...
0
by: bryan rasmussen | last post by:
Hi, I'm doing a sort of symbolic linking app in Windows for my own enjoyment, and figured I would do it in python for the same reason + learning the language. The following functions could...
10
by: James Black | last post by:
It appears that this is actually a difference between whether to use DOM2 or DOM1. I am trying to write my programs using XHTML for the webpage, but, I have to use DOM2 for xhtml 1.1. Now,...
4
by: mentor | last post by:
The following code catch an exception in IE, with number -2146827850 var xmldoc=XmlDocument.create("1str","2str"); xmldoc.documentElement.setAttribute('code',code); ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.