在提交按钮上使用thickbox打开弹出窗口

时间:2012-06-11 12:34:09

标签: jquery perl popup thickbox

我的动机是:

  1. 首先,创建一个表单。
  2. 单击提交按钮时,将打开一个弹出窗口。进一步操作。
  3. 我基本上是在perl中编写代码,包括根据需要的jquery。 对于Popup,我包含了thickbox插件。

    在href上,我可以使用以下代码进行弹出:

    # LIBRARY for JQuery and THICKBOX
    
    print ' <script type="text/javascript" src="/jquery.js"></script>
            <script type="text/javascript" src="/thickbox.js"></script>
       <link href="/thickbox.css" rel="stylesheet" type="text/css" /> ';
    
     #OPENS NEW_PLATFORM.PL in POPUP WINDOW
    
     print '<a href="New_platform.pl?TB_iframe=true&height=580&width=740" 
            class="thickbox">Add New Platform</a><br/>';
    

    我希望在提交按钮上打开相同的POPUP。我的表单代码是:

    print $cgi_plat->start_table({cellspacing=>'5'});
    print $cgi_plat->start_form(
        -id =>'form_plat',
        -method=>'POST',
        -bgcolor => 'white'
    );
    
    print $cgi_plat->Tr(
        $cgi_plat->td(
            $cgi_plat->hidden(   
                -name=>'platform_code',
                value=>$platform_code
            )
        )
    
        $cgi_plat->td( 
            $cgi_plat->submit(  
                -name=>'edit',
                -value=>'edit',
             )
        )
    );
    print $cgi_plat->end_form;
    

0 个答案:

没有答案