It looks like you're using an Ad Blocker.

Please white-list or disable AboveTopSecret.com in your ad-blocking tool.

Thank you.

 

Some features of ATS will be disabled while you continue to use an ad-blocker.

 

XML HTTP Request Inside of Another XML Anyone?

page: 1
0

log in

join
share:

posted on Dec, 11 2006 @ 12:39 AM
link   
okay here is my script on a js file
function ajaxLoader(url,id)
[
if (document.get) [
var x = (window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
]
if (x)
[
x.onreadystatechange = )
[
if (x.readyState == 4 && x.status == 200)
[
el = document.get(id);
el. = x.responseText;
]
]
x.open("GET", url, true);
x.send(null);
]
]






//so here is the code to get the xml file to load another VID layer but it doesnt work for some reason and VID is just the id for a DIV and i left the href out it works from an html ut not from an xml loaded from an html???



posted on Dec, 11 2006 @ 12:46 AM
link   
I'm not sure about xml, but it looks like your first if statement terminates prematurely for one...

But that is only a guess.

And your second if statement does'nt look right.

Also a guess, on my part

from my limited experience with VB, I know that when your nesting multiple statements like that, there are bound to be errors. I would wager that it is either one or the other, or both of what I stated above.



[edit on 12/11/2006 by Mechanic 32]



posted on Dec, 11 2006 @ 12:58 AM
link   
i think i erased it when i was getting rid of te empty spaces, in order to post it here and then more stuff got erased by the board

[edit on 12/11/2006 by razor1000]



posted on Dec, 11 2006 @ 01:04 AM
link   
what you could do alternatively then, is to type it out in MSPAINT, or equivalent, then post the resulting pic.

Yeah, the board probably has filters for code, to deter hackers.



posted on Dec, 11 2006 @ 01:08 AM
link   
here is the xml
< ?xml version="1.0" encoding="UTF-8" ?>

< description>
< div id="content">
< div id="sidebar">
< div id="menu">
< p class="h4">
< a onClick="ajaxLoader('xmlhelp/music.xml','vid')"MUSIC< /a>
PROJECTS
< /div>
< p>This menu is dynamic to the application you are using< /p>
< /vid>

< /div>


< div id="Vid">
< p align="center" class="h1">HELP FILE< /p>
< p>This help file is meant to provide information to common issues in using this website.
If you are having problems aside from anything explained here please send us an E-mail about it.
Also please remember this website is still being constructed so please excuse any bugs you may run across that is all.< br>
This help file is incomplete right now, please bear with us while we upload all the data.
< /p>
< /div>
< /div>
< /description>
and here is the JS
function ajaxLoader(url,id)
[
if (document.get) [
var x = (window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
]
if (x)
[
x.onreadystatechange = )
[
if (x.readyState == 4 && x.status == 200)
[
el = document.get(id);
el. = x.responseText;
]
]
x.open("GET", url, true);
x.send(null);
]
]
ok so this is called in the html file like this
< html>

< head>

< link rel="stylesheet" type="text/css" href=".ml.css">

< script "JavaScript1.2" src=".scripts.js">< /script>
< /head>
< body id="body" ="ajaxLoader('xml/index.xml','content')">
< div id="middle">

< marquee style="color:blue; font-size:14px; font-weight: normal; font-style: normal; font-family: Arial; border: 1px solid" border="1"> Welcome to ChronostarGraphics.com, the the official site of the Chronostar Universe! This is our new website, and it is the 5th generation in that!
< /div>
< div id="content">

< /div>
< div id="footer">

HOME |
UDF ARCHIVE |
DVD SERVICES |
PROJECTS |
CONTACT US |
HELP
< /p>


< /div>
< /body>
< /html>

[edit on 12/11/2006 by razor1000]



posted on Jan, 3 2007 @ 08:37 PM
link   
The only thing I can see wrong with the XML is that the line break (BR) should have a self closing tag like "<BR />". Other than that I dont' see anything right off hand. My bet is that the error is in the _javascript portion of the code. Open your page in Mozilla Fire Fox and selelect JavaScrpt Console under the Tools menu. If a dynamic feature is not working that's where I usually start.



posted on Feb, 27 2007 @ 10:22 PM
link   
i figured out what the problem was since i wasnt using an absolute URI the xml file did not know where to call the next xml file from but now its working so you can visit my site and try it out, by the way i made it for IE7 so it should be working fine in other browsers but for best effect use IE ok the link is in my signiature let me know how you like what i'm doing there ius still a lot more left to add however but the layout is pretty much donne



posted on Oct, 2 2007 @ 02:07 AM
link   
hey o anyone that is interested i will be uploading the new version of my site in a few days so check out the current version if you want to se the improvements



new topics

top topics



 
0

log in

join