Forum Moderators: open
The code below works fine using FireFox, but does not work with IE6.0. I haven't tested with anything else.
document.getElementById("syst").value returns the correct value using FireFox. It returns nothing using IE6.0.
The problem is commented in the JavaScript function below.
I'm basically trying to append a parameter to a URL.
Any help is appreciated. My code indents didn't post. Sorry.
Thanks
<!-- HTML -->
<table border="2" width="730" height="50" cellspacing=5 cellpadding=8; style="font-family:verdana; font-size:125%">
<tr>
<td bgcolor="#115B99"><font color="#FFFFFF">
Choose System
</td>
</tr>
<tr>
<td>
<select NAME=syst id="syst">
<option>Production</option>
<option>Quality</option>
</select>
</td>
</tr>
</table>
:
:
<table border="2" width="730" height="50" cellspacing=5 cellpadding=8; style="font-family:verdana; font-size:125%">
<tr>
<td><A HREF="javascript:OpenURLwithParams('http://blah.blah.com/~blah/GSP/gsp_prmsap_joblog.php', 'N')">Batch Job Log</A> - Summary information for each interface job executed (past 14 days activity)</td>
</tr>
</table>
<!-- JavaScript -->
<script language="JavaScript" type="text/javascript">
function OpenURLwithParams(linkName, withLines)
{
// For the document.getElementById("syst").value...
// FireFox returns either "Quality" or "Production"
// IE returns "" (blank)
$system = document.getElementById("syst").value;
alert("system is " + $system);
if (withLines == "Y") {
defaultLines = "100";
zurl = linkName + "?lines=" + defaultLines + "&system=" + $system;
}
else {
zurl = linkName + "?system=" + document.getElementById("syst").value;
}
self.location = zurl;
}
</script>