View Single Post
  #1 (permalink)  
Old July 15th, 2005, 05:22 AM
losmon losmon is offline
Registered User
Join Date: Jul 2005
Location: Elgin, IL, USA.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Transferring a variable value

I'm currently attempting to show a scrolling marquee when the value of my variable doesn't read "NO CURRENT ADVISORIES". If other than that, it will scroll a message, allowing the user to click on the marquee and a new web page will be displayed.
My variable is in an xml file, and I'm using the "document.getElementById" statement. It is reading the xml just fine. I'm not sure of the code needed transferring "message" to my IF statement.
I'm not having any success doing it.:(
(The div id statement is being used as a test making sure I'm pulling the xml value correctly, and it is working.)

<script type="text/javascript">
var xmlDoc
function loadXML()
//load xml file
// code for IE
if (window.ActiveXObject)
xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
// code for Mozilla, etc.
else if (document.implementation &&
xmlDoc= document.implementation.createDocument("","",null);
alert('Your browser cannot handle this script');
}function getmessage()
if (message != "NO CURRENT ADVISORIES")
       document.write("<table border='1' cellpadding='0' cellspacing='0' width=550 bgcolor='RED'><tr><td><a 

href=''><marquee scrolldelay='125' 

width='550'>NORTHERN ILLINOIS-CHICAGO AREA - WEATHER WARNING ISSUED ... [Click here for details]

<body onload="loadXML()">
<div id="message" style="background-color:pink"></div>


Reply With Quote