Bernd Hochwarter

Navigation

Skip navigation.

Search

Site navigation

Email conversation

FromBernd Hochwarter
ToMe
SubjectXML -> HTML
Date27 January 2005 16:20
hi,
 
i surfed to your HP and was very pleased to see something which may help me.
But i have an other problem with Java Script an XML.
 
I read your Script about importing XML with a 'Submit' Buttom, but i need to
import an XML File with the Event 'onDragDrop'. The Information from the XML
File should be filled in an existing HTML Table. Before the Event
'ondragdrop' is fired, the XML Document doesn't know anything about the HTML
Table.
 
I read through hunderds of pages on the internet, but did not really found
what I am looking for.
 
Maybe you can help me with this problem?
 
 
Thanks a lot in advance!
 
Greets from Austria
 
Bernd Hochwarter
FromMe
ToBernd Hochwarter
SubjectRe: XML -> HTML
Date2 February 2005 22:24
Bernd,

> I read your Script about importing XML with a 'Submit' Buttom, but i need
> to import an XML File with the Event 'onDragDrop'.

ondragdrop is only supported by Netscape 4, and requires elevated security
(and it can't do XML importing anyway).
IE (only) also supports a drag-drop feature that allows you to detect when
a user tries to drag a text selection on the page.
http://www.howtocreate.co.uk/emails/testDragDrop.html

Probably not what you want - it sounds like you want to drop XML files from
your desktop onto the browser and have it process them. This would be a
security violation (local files cannot be read) and would not be allowed.
However, if the file is a remote file (on your server), and you just want
to use the ondrop event to activate it, this can be done. This would
restrict your users to being on IE only, and on Windows only, meaning that
people - like me - who refuse to use something so unsafe and insulting
towards web standards would not be able to use it at all. This includes
users of Opera, Mozilla/Firefox/Netscape6+, Safari/OmniWeb, Konqueror,
ICEbrowser, Escape, etc. I do not recommend you use this at all.

If you still want to, this is approximately what you need (also see the
page as shown above, as it gives more details - some element will also need
to detect the ondragstart event):
<body ondrop="importXML( 'yourfile.xml', 'yourfunction' );">
where 'yourfile.xml' is the file you want to import, and 'yourfunction' is
the function that will process the file and display it in the table.

I have two example pages that import XML and display it in a table:
http://www.howtocreate.co.uk/tutorials/jsexamples/importingXML.html
http://www.howtocreate.co.uk/tutorials/jsexamples/rss.html


Mark 'Tarquin' Wilton-Jones - author of http://www.howtocreate.co.uk/
FromBernd Hochwarter
ToMe
SubjectRe: XML -> HTML
Date3 February 2005 7:38
Hi,

Thanks a lot for your mail!

I'll see what i can do, and tell the community afterwords how it works!

Greetings from Austria
Bernd Hochwarter
This site was created by Mark "Tarquin" Wilton-Jones.
Don't click this link unless you want to be banned from our site.