如何运行在asp.net中使用mootools库的脚本?

时间:2012-01-24 04:44:18

标签: javascript asp.net forms mootools

我正在开发一个包含mailform的网站。我正在使用带有formcheck 1.6 .js的mootools 1.4.3库。所以当我点击BUTTON时,那里什么也没发生。它只是刷新页面。我喜欢这种形式,并且真的想要使用它。我的错在哪里?其实我希望我的表格像[在此输入链接描述] [1]

SCRIPTS

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
         <link rel="stylesheet" href="lightbox/css/prettyPhoto.css" type="text/css" media="screen" charset="utf-8" />
         <script src="lightbox/js/jquery.prettyPhoto.js" type="text/javascript" charset="utf-8"></script>         

         <link href="rss/example_ticker.css" rel="stylesheet" type="text/css" />

         <script src="rss/jquery.zrssfeed.min.js" type="text/javascript"></script>
         <script src="rss/jquery.vticker.js" type="text/javascript"></script>

         <script type="text/javascript" src="formcheck/mootools-core-1.4.3.js"></script> 
         <script type="text/javascript" src="formcheck/mootools-more-1.4.0.1.js"></script>
         <script type="text/javascript" src="formcheck/lang/en.js"> </script>
         <script type="text/javascript" src="formcheck/formcheck.js"> </script>
         <script type="text/javascript" src="formcheck/formcheck-yui.js"> </script>
         <link rel="stylesheet" href="formcheck/theme/grey/formcheck.css" type="text/css" media="screen" />

HTML CODE

<div>
        <form id="mailform" method="post" action="#">
<input type="hidden" name="id" value="112" />
<input type="hidden" name="submitted" value="1" />
<input type="hidden" name="L" value="0" />
<div style="width: 480px; margin-left: 60px;">
  <div style="width: 250px; float: left;  padding: 2px;">
  <div style="width: 110px; float: left; font-size: 11px;">AD SOYAD *</div>
  <input name="name" type="text" id="name" class="validate['required','nodigit']" style="float: left; position: relative; width: 130px; background: #d1d2d4; border: solid 1px #7f8082;"/>
  </div>

  <div style="width: 220px; float: left;  padding: 2px;">
  <div style="width: 80px; float: left; font-size: 11px;">TELEFON *</div>
  <input name="area_telefon" type="text" id="area_telefon" class="validate['required','number']" style="float: left; position: relative; width: 40px; background: #d1d2d4; border: solid 1px #7f8082;"/> 
  <input name="telefon" type="text" id="telefon" class="validate['required','number']" style="float: left; position: relative; width: 87px; background: #d1d2d4; border: solid 1px #7f8082;"/>
  </div>

  <div style="width: 250px; float: left;  padding: 2px;">
  <div style="width: 110px; float: left; font-size: 11px;">FiRMA ADI *</div>
  <input name="unternehmen" type="text" id="unternehmen" class="validate['required']" style="float: left; position: relative; width: 130px; background: #d1d2d4; border: solid 1px #7f8082;"/>
  </div>

  <div style="width: 220px; float: left;  padding: 2px;">
  <div style="width: 80px; float: left; font-size: 11px;">FAX *</div>
  <input name="area_telefax" type="text" id="area_telefax" class="validate['number']" style="float: left; position: relative; width: 40px; background: #d1d2d4; border: solid 1px #7f8082;"/> 
  <input name="telefax" type="text" id="telefax" class="validate['number']" style="float: left; position: relative; width: 87px; background: #d1d2d4; border: solid 1px #7f8082;"/>
  </div>

  <div style="width: 250px; float: left;  padding: 2px;">
  <div style="width: 110px; float: left; font-size: 11px;">ADRES *</div>
  <input name="strasse" type="text" id="strasse" class="validate['required']" style="float: left; position: relative; width: 130px; background: #d1d2d4; border: solid 1px #7f8082;"/>
  </div>

  <div style="width: 220px; float: left;  padding: 2px;">  
  <div style="width: 80px; float: left; font-size: 11px;">E-MAiL *</div>
  <input name="email" type="text" id="email" class="validate['required','email']" style="float: left; position: relative; width: 130px; background: #d1d2d4; border: solid 1px #7f8082;"/> 
  </div>

  <div style="width: 250px; float: left;  padding: 2px;">  
  <div style="width: 110px; float: left; font-size: 11px;">POSTA KODU / SEHiR*</div>
  <input name="plz" type="text" class="validate['number']" id="plz" maxlength="5" style="float: left; position: relative; width: 40px; background: #d1d2d4; border: solid 1px #7f8082;"/> 
  <input name="standort" type="text" id="standort" class="validate['required','nodigit']" style="float: left; position: relative; width: 87px; background: #d1d2d4; border: solid 1px #7f8082;"/>
  </div>

  <div style="width: 220px; float: left; padding: 2px;">  
  <div style="width: 80px; float: left; font-size: 11px;">Web Adresi *</div>
  <input name="internet" type="text" id="internet" class="validate['url']" style="float: left; position: relative; width: 130px; background: #d1d2d4; border: solid 1px #7f8082;"/>
  </div>

  <div style="clear:both;">&nbsp;</div>
  <div style="width: 480px; float: left;  padding: 2px;">  
  <div style="width: 110px; float: left; font-size: 11px;">MESAJINIZ: * </div>
  <textarea name="Mitteilung" id="mitteilungen" style="float: left; position: relative; width: 355px; background: #d1d2d4; border: solid 1px #7f8082; height: 100px;" rows="6" cols="50"></textarea> 
  </div>

    <input name="Submit" type="submit" value="Tamam" style="background: no-repeat 15px url(img/3dots.gif) #c2262e; color: #FFFFFF; text-align: center; padding: 5px; float: right; position: relative; margin-right: 10px; border: none;"/>
</div>
<script type='text/javascript'>

    window.addEvent('domready', function () {check = new FormCheck('mailform', {
            display: {
                fadeDuration: 500,
                errorsLocation: 1,
                indicateErrors: 1,
                showErrors: 1
            }
        })
    });
</script>
</form>

    </div>

2 个答案:

答案 0 :(得分:0)

您无法使用服务器控件提交表单,而必须使用mootool Ajax.Form.或使用Form.Request方法。

答案 1 :(得分:0)

尝试从标题代码中删除jquery,检查它是否有效。