5 <SCRIPT TYPE="text/javascript" SRC="overlibmws.js"></SCRIPT>
6 <SCRIPT TYPE="text/javascript" SRC="iframecontentmws.js"></SCRIPT>
8 include( '/elements/popup_link_onclick.html', { #hashref or a list, either way
11 'action' => 'content.html', # uri for content of popup
14 'actionlabel => 'You clicked', # popup title
19 'closetext' => 'Go Away', # the value '' removes the link
28 my($action, $actionlabel) = ( '', '' );
29 my( $width, $height ) = ( 540, 336 );
30 my $closetext = 'Close';
31 my $color = '#333399';
34 if (ref($_[0]) eq 'HASH') {
35 #$params = { %$params, %{ $_[0] } };
38 #$params = { %$params, @_ };
42 $action = $params->{'action'} if exists $params->{'action'};
43 $actionlabel = $params->{'actionlabel'} if exists $params->{'actionlabel'};
44 $width = $params->{'width'} if exists $params->{'width'};
45 $height = $params->{'height'} if exists $params->{'height'};
46 $color = $params->{'color'} if exists $params->{'color'};
47 $closetext = $params->{'closetext'} if exists $params->{'closetext'};
49 #stupid safari is caching the "location" of popup iframs, and submitting them
50 #instead of displaying them. this should prevent that.
51 my $popup_name = 'popup-'.time. "-$$-". rand() * 2**32;
53 my $onclick = "overlib( OLiframeContent('$action', $width, $height, '$popup_name' ), CAPTION, '$actionlabel', STICKY, AUTOSTATUSCAP, MIDX, 0, MIDY, 0, DRAGGABLE, CLOSECLICK, BGCOLOR, '$color', CGCOLOR, '$color', CLOSETEXT, '$closetext' ); return false;";