version 1.157, 2010/08/08 03:00:56
|
version 1.158, 2011/12/09 22:04:55
|
Line 116 sub start_script {
|
Line 116 sub start_script {
|
my $function_name = |
my $function_name = |
join('_','LONCAPA_scriptvars',$uname,$udom, |
join('_','LONCAPA_scriptvars',$uname,$udom, |
$env{'form.counter'},$Apache::lonxml::curdepth); |
$env{'form.counter'},$Apache::lonxml::curdepth); |
my $script_var ="<script type=\"text/javascript\"> |
my $scriptblocklog=$start_page. |
// <![CDATA[ |
&Apache::loncommon::start_scrollbox('500px','480px','480px'). |
function $function_name() {newWindow=open('','new_W','width=500,height=500,scrollbars=1,resizable=yes');newWindow.$windowopen;newWindow.document.writeln('$start_page<pre>"; |
'<pre>'.&Apache::run::dump($target,$safeeval).'</pre>'. |
my $listing=&Apache::run::dump($target,$safeeval); |
&Apache::loncommon::end_scrollbox(). |
$listing=~s/\\/\\\\/g; |
$end_page; |
$listing=~s/\'/\\\'/g; |
$scriptblocklog=~s/\'/\\'/gs; |
$script_var.=$listing; |
&Apache::lonxml::add_script_result( |
$script_var.= "<\\/pre>$end_page');newWindow.document.close();newWindow.focus()} |
&Apache::loncommon::modal_adhoc_script($function_name,500,500,$scriptblocklog). |
// ]]> |
"<a href=\"javascript:$function_name();void(0);\">".&mt('Script Vars')."</a><br />" |
</script><a href=\"javascript:$function_name();void(0);\">".&mt('Script Vars')."</a><br />"; |
); |
&Apache::lonxml::add_script_result($script_var); |
|
} |
} |
} elsif ($target eq "edit" ) { |
} elsif ($target eq "edit" ) { |
#&Apache::run::run($bodytext,$safeeval); |
#&Apache::run::run($bodytext,$safeeval); |