[Javascript] Unsubscribe

guhan s.guhan at pacific.net.sg
Fri Mar 30 20:52:47 CST 2001


result in what's seen by the user.  The value of that element will be
dynamically generated by a backend script and built into the
javascript.  The only snag to this equation is that some variable names
have [ ]'s in their names (which is a reserved character in javascript.

This is what I have:

<html>
<head>
<Script Language = "Javascript" Type="Text/Javascript">

<!--  Hide script from older browsers
 pWin = window.opener;
 pOpt = pWin.document.formName.elements["step_spec_nameID"].options;
 pOpt[pOpt.length] = new Option('This is a test', 5652023, true, true);
 window.close();
// -->

</script>
</head>

In Netscape it works with ONE exception.  Although the value APPEARS to
be
selected once it's dynamically added, if the user doesn't actually TOUCH
the pull down (ie, REselect the value) it will submit the form with the
Unsubscribe




More information about the Javascript mailing list