Hi Cycloneous Echevarria,
Thanks for your help. I tried your suggestion, but I still can't get my
page to work. (I don't know javascript!). Here is all the script in the
head.
I pasted your script in at the bottom.
<SCRIPT language="JavaScript" TYPE="text/javascript">
<!--
var NSWindows;
var is = new Object();
is.agent = navigator.userAgent.toLowerCase();
is.ie55 = (is.agent.indexOf("msie 5.5") != -1);
is.ie6 = (is.agent.indexOf("msie 6") != -1);
is.ns6x = (is.agent.indexOf("netscape6") != -1);
is.moz = (is.agent.indexOf("gecko")!= -1);
is.win = (is.agent.indexOf("win") != -1);
function NSWindowOpen(path, winName, dimensions, scrollbars,
toolbar, properties, loc_left, loc_top) {
if (NSWindows == null) {
NSWindows = new Array();
}
var index = NSWindows.length;
for (var i = 0; i < NSWindows.length; i ++) {
if (NSWindows[i] == null) {
index = i;
break;
}
if (winName == null) {
if (NSWindows[i].closed) {
index = i;
break;
}
} else {
if (NSWindows[i].closed) {
index = i;
} else if (NSWindows[i].name == winName) {
NSWindows[i].close();
index = i;
break;
}
}
}
if (winName == null) {
winName = "nswin" + index;
}
if (dimensions == null) {
dimensions = "width=780,height=540";
}
if (properties == null) {
properties = "resizable=yes";
if ((scrollbars == null) || (scrollbars == true)) {
properties += ",scrollbars=yes";
}
if (toolbar == true) {
properties += ",toolbar=yes";
}
} else {
if (properties.indexOf("resizable=") == -1) {
properties += ",resizable=yes";
}
if ((properties.indexOf("scrollbars=") == -1) &&
((scrollbars == null) || (scrollbars == true))) {
properties += ",scrollbars=yes";
}
if ((properties.indexOf("toolbar=") == -1) &&
(toolbar == true)) {
properties += ",toolbar=yes";
}
}
if (loc_left && loc_top) {
properties += ",top=" + loc_top + ",left=" + loc_left;
} else if (loc_left) {
var loc_x = Math.floor((screen.availLeft || 0) + (loc_left / 100 *
screen.availWidth));
var loc_y = Math.floor((screen.availTop || 0) + (loc_left / 100 *
screen.availHeight));
properties += ",top=" + loc_y + ",left=" + loc_x;
}
var offsite = false;
if( (path.indexOf('http') != -1 && path.indexOf('netschools') == -1)
||
path.indexOf('offsite') != -1 ) {
offsite = true;
}
properties += "," + dimensions;
NSWindows[index] = window.open(path, winName, properties);
return false;
}
function NSWindowOpenNoFalse(path, winName, dimensions, scrollbars,
toolbar, properties, loc_left, loc_top) {
NSWindowOpen(path, winName, dimensions, scrollbars, toolbar,
properties, loc_left, loc_top);
}
function NS_openWindow(page) {
NSWindowOpen(page, 'NSWindow', null, null, null,
'menubar=yes');
}
function NS_swapImageSimple( image, pos ) {
document.images[pos].src = image;
}
function MM_openBrWindow(theURL,winName,features) { //
v2.0
if (objWindow && !objWindow.closed){
objWindow.close();
}
objWindow = window.open(theURL,winName,features);
objWindow.focus();
}
function NSbutton_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.NSbutton_p)
d.NSbutton_p=new Array();
var
i,j=d.NSbutton_p.length,a=NSbutton_preloadImages.a rguments; for(i=0;
i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.NSbutton_p[j]=new Image;
d.NSbutton_p[j++].src=a[i];}}
}
function doSubmit() {
****var i = document.regForm.standardcode.selectedIndex;
****var url = document.regForm.standardcode.options[i].value;
****
****document.regForm.action = url;
****document.regForm.submit();
****// second option
****// uncomment to activate
****
****// location.href = url;
****
}
//-->
</SCRIPT>
And here's what's in the body.
<TD CLASS="form-item-label"> </TD>
<TD> </TD>
<TD CLASS="form-item"><TABLE BORDER="0" CELLPADDING="0"
CELLSPACING="0" >
<TR>
<TD CLASS="form-item"> Standard</TD>
</TR>
<TR>
<TD>
<form name = "regForm"><select name="standardcode" size="10"
onChange="doSubmit();" tabindex="4">
****<option value="0" selected>-- Select a standard--</option>
<option value="../Teacher/MySchool/Reports/SampleReports/AL/AL
curr cov.htm">Alabama</option>
Can anyone see my problem here?
When I select the state, the htm file will not load.
thanks!
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!