Fix to break out of frames
authormoodler <moodler>
Sun, 10 Nov 2002 08:08:23 +0000 (08:08 +0000)
committermoodler <moodler>
Sun, 10 Nov 2002 08:08:23 +0000 (08:08 +0000)
lib/weblib.php

index 8b3d22e..28604d2 100644 (file)
@@ -287,8 +287,8 @@ function popup_form ($common, $options, $formname, $selected="", $nothing="choos
         $nothing = get_string("choose")."...";
     }
 
-    $output = "<FORM NAME=$formname>";
-    $output .= "<SELECT NAME=popup onChange=\"window.location=document.$formname.popup.options[document.$formname.popup.selectedIndex].value\">\n";
+    $output = "<FORM TARGET=_top NAME=$formname>";
+    $output .= "<SELECT NAME=popup onChange=\"top.location=document.$formname.popup.options[document.$formname.popup.selectedIndex].value\">\n";
 
     if ($nothing != "") {
         $output .= "   <OPTION VALUE=\"javascript:void(0)\">$nothing</OPTION>\n";