I have this script that is called when a form is submitted. It is supposed to display
a popup window if two of the three selectboxes are the same. It works good except
that if the first box is selected and the other two are null or empty then the popup
appears. Same thing happens with the second box selected and the first and third null
or emtpy, and the same with the third box. Otherwise it works great with two boxes
selected that might be the same. Any ideas on where I have gone wrong with this one?
TIA,
cami
function popup( pageToLoad, winName, width, height)
{
if ((document.updatefav.myselectbox.value == document.updatefav.myselectbox1.value) ||
(document.updatefav.myselectbox.value == document.updatefav.myselectbox2.value)
||
(document.updatefav.myselectbox1.value ==
document.updatefav.myselectbox2.value))
{ if ((document.updatefav.myselectbox.value == null) &&
(document.updatefav.myselectbox1.value == null))
{return true;}
else if
((document.updatefav.myselectbox.value == null) &&
(document.updatefav.myselectbox2.value == null))
{return true;}
else if
((document.updatefav.myselectbox1.value == "") &&
(document.updatefav.myselectbox2.value == ""))
{return true;}
else
{
xposition=200; yposition=300; width=250; height=90
args = "width=" + width + "," + "height=" + height + "," +
"location=0," + "menubar=0," + "resizable=1," + "scrollbars=0," +
"status=0," + "titlebar=0," + "toolbar=0," + "hotkeys=0," + "screenx=" +
xposition + "," + "screeny=" + yposition + "," + "left=" + xposition + "," +
"top=" + yposition;
window.open( "processed.htm","popup_win",args );
return false;}
}}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists