473,386 Members | 1,775 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,386 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 9050
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...

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.