![]() |
|
|||||||
| Notices |
| Programming Forum Web and Software Programming Forum - Java, PHP, SQL etc. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
||||
|
Dear Estetica forum members,
Unfortunately I dont get much time to come on these forums these days but I am hoping someone wouldn't mind sparing a few minutes of their time to look over something for me? I am trying to load an XML document into an HTML document using javascript and style it using CSS. I have managed to style the XML file using an XSLT doc but now wish to try with javascript and CSS. Can any body help? I have attached the XML file along with a rather poor drawing of what I will try and accomplish with the CSS: www.bekids.co.uk/joe/cssidea.jpg www.bekids.co.uk/joe/oil.xml If any body could help, it would be most appreciated Hope everyone is keeping well. Joe
__________________
Joe Morgan .Be Kids - Live Strong Last edited by Joe.Morgan; 10-05-2008 at 08:53 PM. |
|
||||
|
Mack is the king of the Flash department... PM him, I'm sure he'll point you in the right direction.
__________________
Tommy Logic ™ Web Design :: Valid XHTML & CSS :: SEO :: CMS :: eCommerce Web Design Tutorials :: Computer Tutorials |
|
||||
|
Quote:
|
|
||||
|
Work in progress - it doesn't work tho
PHP Code:
__________________
Joe Morgan .Be Kids - Live Strong |
|
||||
|
I'm not really up on my xml, but i think your problem is here:
Code:
x[i].getElementsByTagName("oil")[0].childNodes[0].nodeValue);
You've already defined x as being xmlDoc.getElementsByTagName("oil") so that means you're writing: xmlDoc.getElementsByTagName("oil").getElementsByTagName("oil")[0]. So that's going to fail straight off the bat. It's not a huge deal for just getting things working, but for validation purposes, avoid using document.write Take a look at the code here on this page and it should set you on the right path. You'll notice it uses document.createElement and document.createTextNode instead of document.write. That's the proper DOM way to do it. JavaScript - Import XML Document
__________________
Subtlety is my middle name... and first and last in case you didn't get the point. |
![]() |
|
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Javascript Mario | jinny | Games | 2 | 02-05-2008 05:56 PM |
| Javascript SmoothGallery 2.0 | Graphic Design Links | Graphic Design Links | 0 | 24-01-2008 12:10 PM |
| Yahoo & Javascript | Toon | General Web Design Forum | 0 | 12-12-2007 08:05 PM |
| my javascript website | solidgold | Web Design Forum Showcase | 5 | 12-06-2007 06:24 PM |
| New Javascript Menu | Toon | General Web Design Forum | 1 | 26-03-2007 01:31 PM |
| All times are GMT. The time now is 09:57 AM. |
