Hey, I'm pretty new to JS. I have just written a script for a menu
system that mimicks a form. Basically there are two lists of links, one
selects a city and the other selects a service provider. What the script
is meant to do is assign the value submitted by a link to a variable which
is then displayed at the bottom of the form and later submitted in a query
string via a seperate function. This script works perfectly in Internet
Explorer but it doesn't seem to do anything in Netscape. Java is
installed in the browser and the variables are collected (i've found that
much out) but it doesn't display them at the bottom of the page or forward
them to the next page as it does in IE. If your not sure what I mean
check it out in action at:
http://www.homereferral.com/test/SelectCat.asp
Here's the source code:
------------------------------------
//initializes the variables for JJ's scripts
var City;
var Provider;
var Qmark;
City = "";
Provider = "";
function JJ_SetVariable(value, setting) {
if (setting == 1) { City = value; cityValue.innerText = City; }
else if (setting == 2) { Provider = value; providerValue.innerText =
Provider; }
}
function JJ_SubmitToQuery() {
if (City == "") { alert("Please choose a city."); }
else if (Provider == "") { alert("Please choose a service provider."); }
else { window.location.href = " http://www.nforce-media.com/display.asp?
City="+City+"&Provider="+Provider+"&State=<%=State%>";}
}